web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Loop through a table o...
Power Automate
Unanswered

Loop through a table on a website

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a website with an HTML table. The first column in each row contains a link.

When clicking this link another tab opens and I have some other clicks that I run there. Once completed, I want to close that tab and click on the next link in the table.

I can't extract the links since they are JS actions and only work in the context of the page.

How do I loop through each row on the page?

 

Thanks

Sam

I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    Are you able to get the entire Html table with the contents present in it? This will be into a Datatable. Then loop through the datatable and use "Go to webpage" to navigate to any of those links.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    In theory yes, I can get the whole datatable. The issue is that the links aren't static links, they are JS actions which will do nothing if used as external links. I need a way of actually clicking each on of them on the page itself.

  • VJR Profile Picture
    7,635 on at

    Does the recorder give anything when you manually click the links while recording?

    Is there some public website that you can point to with the Js actions.

  • Gidi Profile Picture
    601 on at

    Have you tried to use keyboard actions to click the links?

  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    The location and selectors are not saved with the table, so you have to create a UI element to use in combination with a loop. The UI element should have a custom selector containing a loop variable that dynamically changes. If that variable is a %LoopIndex% or a %CurrentItem% depends on how your table is set up, and what your desired data outcome is.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Any solution of exporting or recreating the links doesnt work since the application doesn't allow us to open them as standalone links. They must be opened from the main page with the table. The table is a standard HTML table and the links are in a fixed column. The table looks as follows:

    SamPo_0-1657105239591.png

    We need a way of looping through each 'tr' element in the table and then selecting the third 'td' element for each record. We then need to click on the link of that selected record. How can we create this loop for the table records in the HTML?

     

    Example of the table: (We need to click the values in the 3rd column under 'Process Name')

     

    2022-07-06_12-03-13.png

     

     

     

     

    Thanks

    Sam

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Did you ever get a solution to this?  this is almost exactly the situation I'm in right now.  JS code on the link, it opens a dynamically generated table in the page (instead of a tab), and creates another dynamically generated url that is the one i actually need to click.  I've been searching for a solution for longer than i care to admit.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard