I need you help with the following topic.
I data scrap a datatable in a website representing reports I would like to download.
Each line is a report with col 1: the name / col 2: the status (In Progress / done/etc)/ col 3: the date.
I need to loop in this structured datatable and if the date = today And the stauts =done, so i click on the link.
I don’t manage to write the condition in the If statement.
Run a for loop on datatable(say your datatable name is dt_Test).
then check its columns using below syntax:
dt_Test.Rows( ‘row number’).Item(“Column Name”).ToString
lets say rownumber is 0, column name is colname then it would look like below:
dt_Test.Rows(0).Item(“colname”).ToString
alternatively, you can use column number instead of column name as shown below:
dt_Test.Rows(0).Item(10).ToString
then to add condition for status would be something like below:
if (dt_Test.Rows(0).Item(“colname”).ToString).contains(“done”)
then … further steps in your sequence
Using the syntax i provided you should be able to fetch column values.
Also, I would recommend going through below course section in ‘RPA developer foundation’ on uipath academy to understand working of datatables in a better way.