Need Help to loop a Structured Data table in If statement

Hello Uipath community,

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.

Could you please help me?

Hi @MATRAY_Guilhem,

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:
alternatively, you can use column number instead of column name as shown below:

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


Thanks Sonali.
Can you develop how to check the columns of the datatable?
Do I have to use a test sequence?

Thanks a lot for your help, I really appreciate

Hi @MATRAY_Guilhem,

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.

Link to the course:


Hi Sonali,

Thanks a lot.

I tried using your syntaxe:

but it seems that I still have an issue.

I already looked into this course: i will definitely watch it again.

Hi @MATRAY_Guilhem,

Syntax you are using in the screenshot is different from the one I shared above.

Please try using the one I provided and see.


Do you mean replacing “Row” by 0? That works but how can I put this condition into a loop if I cannot put a variable in it?

Sorry, maybe my questions are stupids

Per this, syntax should be somewhat like this:


Please cross check your syntax.


I don’t see any error now. I will continue the next steps.

Thanks a lot for your help!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.