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 / Populate Two UI Elemen...
Power Automate
Answered

Populate Two UI Elements that Have Same HTML

(0) ShareShare
ReportReport
Posted on by 158

Hello, I am trying to populate two identical UI elements in a web page. Both have the same HTML so I tried using ordinals with an incrementing variable called "Index2," but I am only able to populate the first of the two. How can I populate both?

 

Screenshot 2023-07-25 at 7.13.46 PM.pngScreenshot 2023-07-25 at 7.25.50 PM.pngScreenshot 2023-07-25 at 7.27.59 PM.pngScreenshot 2023-07-25 at 7.26.52 PM.png 

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

    Hi @OnurOnal 

     

    While keeping the index as 1 , did you check that selector is highlighting next ui element as expected using test selector option in selector panel ?

     

    Kindly let me know 

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You need to apply the ordinal property to the appropriate element. You only have one <input> type element under the parent <div>. So, it cannot insert the text into the second one.

     

    You probably need to do something like div:eq(%Index2%) > div > div > input

    Can't really tell where exactly in the structure you need to add it, because not all of the details of the page are visible in the screenshots. The idea is that it must be applied to the part of the selector that would lead you to the other input field. 

    -------------------------------------------------------------------------
    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.

     

  • OnurOnal Profile Picture
    158 on at

    @Nived_Nambiar,

     

    Neither of the UI elements are highlighted by the selector.

  • OnurOnal Profile Picture
    158 on at

    @Agnius,

     

    Below is an image of the two UI elements in the same HTML document. Is it possible to derive the correct selector from this information. If so, what would that selector be?

     

    Screenshot 2023-07-26 at 1.57.57 PM.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I suggest you try the following for the selector:

    div[Class="ui segment form"]:eq(%Index2%) > div > div > div > div > div > input[Id="orderable_item_supplier_catalog_number"]

    -------------------------------------------------------------------------
    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.

  • OnurOnal Profile Picture
    158 on at

    @Agnius,

     

    This did not work. It populated the first element but the second still remains unpopulated.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Do you increment your index in the flow, to be equal to 0 for the first element and 1 for the second one?

    Can you share a screenshot of the part of the flow that does this?

    -------------------------------------------------------------------------
    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.

  • OnurOnal Profile Picture
    158 on at

    Yes, I do increment the "Index2" variable.

     

    Screenshot 2023-07-26 at 3.35.44 PM.png

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What is in the %UsageType% variable? It seems like it is a list. If it is, you should use %UsageType.Count-1% as the value in your WHILE loop, rather than %UsageType% itself. Comparing an integer to a list does not make sense.

    -------------------------------------------------------------------------
    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.

  • OnurOnal Profile Picture
    158 on at

    The %UsageType% variable is not a list. It is a numeric variable I set earlier in the code. It has the value 2, so the loop iterates two times.

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