How to start from a specific row in DT

Hi there:) I’m a rookie in UiPath automation. I have a datatable with Links to webpages (one column, multiple rows).

Each of the links is just a part of the link (that’s how it got downloaded from the webpage):

example: in my DT I have “/RPM/Details?id=2810” as link .

In for each activity I want to get into each of the items in DT - open each link to copy some data.

I use Open browser activity and in the URL I use “https://rpwdl.ezdrowie.gov.pl/” (first part of the link + +row.item(0).tostring

My issue: I want to change the start row - with the above it always starts from the first item in DT, I want to be able to change the row in DT - how can this be achieved?

many thanks !

Hello @Krzysztof_wozniczek ,

Maybe you should add another column with a status, called Status.
After you visit a link, write the status in that column. (example: visited)

In your for each row activity add a condition like, in an IF activity:
If row(“Status”).Tostring.trim.Contains(“visited”)
Skip
Else
Navigate to …

Just an idea…

Vasile.

Hi Vasile, many thanks for your quick response and idea!
Actually, following your idea what I would need in my ‘for each’ activity to be able to specify from which column in DT the for each should start.

As programming is not my strong side (to say it politely :slight_smile: ) I thought that I can just specify that using an expression where I specify with the number:

I have in my for each this thing in the 'Open Browser" activity: “https://rpwdl.ezdrowie.gov.pl/”+row.item(0).tostring

  • Would it be possible to somehow modify the expression after “+” to specify the start row?

Rookie question, but help would be very much appreciated :slight_smile:

  • Another Idea (following your idea with adding a column) - if the above would not be possible, maybe I would need a column which would just have a number of the row (lets call it RowNumber) - then I would, in the IF specify that if RowNumber >=than X, open browser - I could then by changing the X specify where the For each starts. Would this ‘fly’?

@Krzysztof_wozniczek ,

I’m not a programmer also, but I like to work with UiPath, and most of the things I learned from this forum and their academy.

  1. Maybe this helps:
    Make for each row start at specific row in datatable

  2. Maybe here, if you have a column with Index, you can filter the data table first. Take only the rows that are bigger/lower than your specified number. Filter Data table activity

Here is explained another workaround, without using For each row:

Might help.

Vasile.

ok, I think I got it - there is a RowInd which can be used already - I have used an IF and I specified eg RowInd bigger than X and it works :slight_smile:

Great.

Happy automation!

1 Like

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