How to run PLAY LOOP command on the basis of a value in CSV column

Hi,
I have a csv file , in which every third row or say fourth row has a URL value (like google.com) so the new loop should run from the row where first column has the URL value .

Also , is it possible to loop through three rows and particular set of columns for performing the same action , say , add a vehicle repeatedly with same number of data but different values

I’m extremely new to Kantu
Thanks in advance

Instead of using the LOOP button, you can do what you need with the

  • While… End
  • or: Do… Repeat If

commands. See also the DemoCSVReadWithWhile macro that ships with UI.Vision.

Hi
This url https://github.com/A9T9/Kantu/blob/master/testmacros/DemoCsvReadWithWhile.json is not working

@DikshaBaluja Sorry, the URL link in the docs was broken (fixed now). The new valid link is:

You also find the macro directly inside UI.Vision:

json

1 Like

Thanks for the help . It solves the problem

Though I’m still having problem in understanding how to use something like for loop, like looping through some 7 columns and 3 rows performing the same function

Something like

COL1 COL2 COL3 COL4 COL5 COL6 COL7 (row1)
COL4 COL5 COL6 COL7 (row2)
COL4 COL5 COL6 COL7 (row3)

I want to iterate through COL4 to COL7 from row1 to row3 in same execution cycle performing the same function , of say , adding a property in an application

Thanks a lot in advance

To clarify: So in one loop you want to read 3 rows? Or do you mean you want one cell only per loop?

Yes, I want to read 3 rows in one loop

This is possible but more tricky. By default, each call of csvRead increases the row count by one. So within in your loop you will have 3 csvRead, one for each row. After each csvRead you need to store the !COLx values in variables, so the next csvRead does not overwrite them.

Note that (if needed) you can set the row that csvRead loads manually with the ${!csvReadLineNumber} variable.

Okay , Thank you so much
I’ll try this out :slight_smile:

Hi,
would you please be able to help on this?