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 / Problem with dynamic s...
Power Automate
Suggested Answer

Problem with dynamic selector for an element on a web page

(0) ShareShare
ReportReport
Posted on by
Hi,
I made a flow in power automate desktop that opens a website.
 
On this page there is a link with an eye icon. I made a loop that clicks on the eye icon in the table, collects data and returns to the previous page. I would like this action to be performed for all records in the table.
 
problem description:
The eye has the following selector:
a[Id="searchResultForm:orderSRT:0:j_idt242:0:viewSelectedRowItem"] > em
 
the next ones have:
a[Id="searchResultForm:orderSRT:1:j_idt242:0:viewSelectedRowItem"] > em
a[Id="searchResultForm:orderSRT:2:j_idt242:0:viewSelectedRowItem"] > em
 
I wanted to make a dynamic variable, because as you can see, the selectors only differ in number. I used LoopIndex for this, but the flow stops.
 

a[Id="searchResultForm:orderSRT:%LoopIndex%:j_idt242:0:viewSelectedRowItem"] > em
 
do you have any ideas?
 
eye_problem.png
I have the same question (0)
  • Suggested answer
    eetuRobo Profile Picture
    4,535 Super User 2026 Season 1 on at
    Hi,

    How does the flow stop? Does it give you an error?

    Try to toggle the Text editor ON and save the UI Selector after you have toggled the Text editor on.


    There is a long lasting bug on PAD that makes the variables not work on UI element selectors if the Text editor is not on.

    Method 2
    Wrap the text inside string syntax: %'here start of the text'%%LoopIndex%%'here end of the text'%


    So in your case if the id looks like this: searchResultForm:orderSRT:%LoopIndex%:j_idt242:0:viewSelectedRowItem
    Then change it to %'searchResultForm:orderSRT:'%%LoopIndex%%':j_idt242:0:viewSelectedRowItem'%

     

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard