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 / First Occurrence of a ...
Power Automate
Unanswered

First Occurrence of a Selector

(0) ShareShare
ReportReport
Posted on by 158

Hello, I have a Power Automate Desktop flow that maps spreadsheet data into a webpage. A certain UI element in this website has an HTML structure that changes dynamically. To be able to select this element, I used a regular expression that refers to the portion of the HTML that dynamically changes (Both the photos of the HTML structure and the selector are below). This way, I am able to select the element, but it seems that some other UI elements have the same regular expression so they are selected as well. In the photo below, many UI elements are selected and populated however I wish to only select and populate the one circled in red. Is there a way I can only select the first occurrence of the selector?

 

 

Screen Shot 2023-05-09 at 8.44.05 PM.pngScreen Shot 2023-05-09 at 8.43.02 PM.pngScreen Shot 2023-05-09 at 8.41.21 PM.png

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @OnurOnal 

     

    could you try this selector to select first occurence ?

     

    input[name*="price"]:eq(0)

     

     

    Hope it helps !

     

  • OnurOnal Profile Picture
    158 on at

    @Nived_Nambiar,

     

    This selector does not work. Instead of selecting multiple UI elements it selects nothing.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @OnurOnal 

     

    Have you validated the selector ?

     

     

  • OnurOnal Profile Picture
    158 on at

    Hello @Nived_Nambiar,

     

    I ran a test selector and Power Automate was able to detect the UI element. But for some reason it does not enter any data.

     

    Screen Shot 2023-05-13 at 7.33.02 AM.png

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @OnurOnal 

     

    could u share the action details screenshot which you are using to enter the data ?

  • OnurOnal Profile Picture
    158 on at

    @Nived_Nambiar,

     

    I am not certain what you mean by the action details. Would you be able to clarify?

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Just show the screenshot of  action which you have used to enter details to website ?

     

  • OnurOnal Profile Picture
    158 on at

    @Nived_Nambiar,

     

    I tried doing eq(1) as the ordinal with a regular expression and it seems to have worked. The only issue is that it only works in the first iteration of the loop. The second iteration just leaves the field blank. Why could this be happening?

     

    Screen Shot 2023-05-16 at 2.32.31 PM.pngScreen Shot 2023-05-16 at 1.17.47 PM.pngScreen Shot 2023-05-16 at 2.36.10 PM.png

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @OnurOnal 

     

    you need to increment the number present in eq()

     

    for first row it is eq(1), for second row it is eq(2) like that, 

     

    Hope it helps !

     

     

  • OnurOnal Profile Picture
    158 on at

    @Nived_Nambiar,

     

    The ordinal attribute only takes numeric values for input. I believe that I would need a variable if I wish to increment the number in eq(). How can I do this?

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard