I have a data table and I would like to check for all the rows if the word “Hello” is contained in such rows.
When I use the activity for each row and then if → datatable.tostring.contains(“Hello”) it does not work.
What could I do?
You are almost there. Use Output Data Table activity to output your entire Data Table to a string. Then use your mentioned .Contains method with that string to do the check.
Thank you very much.
However, I would like to know the number of the row that contains the string.
If I convert the data table into a string, I will not be able to know the number of the row. Am I right?
And Please Update
See attachment for the working solution
CheckIfRowContainsString.zip (7.6 KB)
I hope it is clear, but let me know if you have any questions.
this worked perfectly! thanks for your help!
If i have multiple columns with “HELLO” how it works ???
Can we use a string variable to to check it is exists on a datatable string or not.
If the loop is too old please create a new post for your query.
For your question there are multiple ways to check if a string value exists in datatable,
- using select statement: if you know the column name you can use dt.select("[ColName] = ‘"+stringValue+"’"), this will give you array of data rows and you can convert back to table using .copytodatatable in the same select query.
- if you don’t know the column then you can use look up range activity: give the string input and then sheetname where you need to search and output will be the cell address of the first occurance, if there is no string present in the datatable then the output will be null.
Let us kno if this helps.
Hi could you also help in a similar task ,I have extracted from structured text from a web browser containing various tasks in form of a data table. I would like to find all those tasks which contain the word Onboarding and then use the click activity to click on those links and click on another button post that.So basically what I want is the bot to extract all text by data scraping, select those text where the word onboarding is there, and then post that click on those links one by one.
Have you completed the UiPath Academy Advanced Training? It contains similar workflows to what you are asking.
Hi nlee, I am currently at the orchestrator training, and I don’t think I will be able to access this part before completing the above, is there any videos or workflow you could share executing the same process.
Due to the rules of the academy, I cannot share the workflows. There are videos on youtube if you search for UiPath Academy walkthroughs.
Can you p;ease attach xaml file