Skip to main content
Community site session details

Community site session details

Session Id : dPqPMzjhoxSs0SBBfkrOBP
Power Automate - Power Automate Desktop
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 1 Dec 2023 18:37:37 by

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!

 

 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 02 Dec 2023 at 06:50:48
    Re: How to select each item in a list with the same element values

    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.

  • UshaJyothiKasibhotla Profile Picture
    63 Moderator on 02 Dec 2023 at 03:51:55
    Re: How to select each item in a list with the same element values

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

    by its position.

     

    Hope this helps

    Usha

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete