How to open dynamic URLs one by one coming from a Filtered Data Table

Hi, I am trying to navigate to the URLs coming from the filtered data table one by one and want to do some activity and close it. I am using For Each Row loop for this.

Currently, it only navigates to the last URL. Please see the screenshot.

I would appreciate your help!

@hacback17

Instead of CurrentRow(1).ToString, Try as CurrentRow(“ColumName”).ToString

CurrentRow(1).ToString->Will take the 2nd URL only always

To loop entire rows then write as CurrentRow(“ColumName”).ToString

Hope this will help you

Thanks

1 Like

Thanks @Srini84! I did try your method but it didn’t help much. That said, I don’t understand the difference between the previous method and your method.


The behavior is still the same: only the last URL opens up in the browser.

I am attaching the file for your detailed look.
Main.xaml (22.3 KB)

Hi @hacback17

Can you add a If condition like below and check you are getting value on the filtered table for URL each time?

Thank you.

2 Likes

Great point. On checking, I realized I am not getting the values sequentially from the filtered data table. So the possible solution would be to get the URLs coming from filtered Data Table and store them in an array, wouldn’t it? Is this a correct way to do it or there is a better approach?

Appreciate your time and effort.

Please analysis the DataTable before filter and ensure the expected URL value there in the DataTable and apply relevant filter to get the values as you expect.

Thank you.

I think it’s not the last URL
It’s the only URL passed to the FOR EACH ROW activity

Which means other URLs are getting filtered before it is being passed to For each row activity

And it is absolutely fine sending a datatable and looping through one specific column which has the URL so that it will open each row each url one by one

Coming back to point - I could see you are using a FILTER DATATABLE activity and a Output datatable activity

Just to check whether filter datatable is giving the right value pass dt variable in a writeline activity like this

ExtractDatatable.Rows.Count.ToString

If this shows count as 1 then it is something with Extract datatable activity
Redo the same data extraction and check with Preview before finishing data extraction process

If it is more than 1 then it’s fine

Cheers @hacback17

1 Like

Hi @hacback17 ,

Just now reviewed your code and i could see that you are using extract structure data activity to extract the table data from the website. Some times we have to modify the extract meta data to get the correct output.

My suggestion for your issue is can we try with the extract table data activity it is much more advance than extract structure data activity and we no need to worry about the metadata and also it is having option like we can perform pagination also for the tables. Please try to use extract table data activity instead extract structure data activity and let us know. thanks.

https://docs.uipath.com/activities/docs/n-extract-data

1 Like

Thanks @Palaniyappan for the tip! Yes, just checked, there are more than 1. In my case, it’s 13 as of now:-)

1 Like

Sure, thanks @kirankumar.mahanthi1! I am going to give it a try!

1 Like

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