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 / How to select each ite...
Power Automate
Unanswered

How to select each item in a list with the same element values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow which extracts a list of elements from a web page then clicks each item in the list. The html element doesn't contain links, just the element which needs to be clicked. I extract the element text and title as a datatable, and then loop through each of the items, using a custom selector.

 

Here is the flow.

eloomis_0-1701455203762.png

 

This is how the data table looks after extraction

eloomis_1-1701455256628.png

 

This is my custom selector

eloomis_2-1701455290499.png

 

The issue is that sometimes, as is the case in the screenshot above, all the items in the datatable have the same values even though they link to different pages with different values. But the selector will just always select the first item in the list because they have the same title which is what my custom selector relies on. I can't find anything about the elements HTML that differentiates them.

 

It seems like maybe I can do something with the ordinal attribute to differentiate each item, but I'm not sure how to go about that.

 

Any help is much appreciated!

 

 

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    have you tried with the click activity and give the input as job[0]

    by its position.

     

    Hope this helps

    Usha

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The Ordinal attribute is essentially the index of the element in the structure. The first item will have an ordinal value of 0 (because it is usually 0-based), the second will be 1, etc. You pass that to the selector as span:eq(%Index%). Can try that by generating an index before your loop and then incrementing it inside the loop as you click through those elements.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard