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 / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop dynamic selector

(0) ShareShare
ReportReport
Posted on by 31

Hi,

In my use case I have to read the value from excel ,and select the row in the table with the value read from the excel . I tried with 2 value VISA13 and VISA14 ,got the below value in the UI Selector page

div[Id="pt1:_FOr1:1:_FONSr2:0:_FOTsr1:0:AP1:AT1:_ATp:t2::db"] > table > tbody > tr > td > div > table > tbody > tr > td:eq(12)
div[Id="pt1:_FOr1:1:_FONSr2:0:_FOTsr1:0:AP1:AT1:_ATp:t2::db"] > table > tbody > tr > td > div > table > tbody > tr > td:eq(18)

 so the value in td:eq() dynamically changes 

can anyone help me how to dynamically pass the value in UI element ?

pic.png

below is the inspect of the row VISA14

 

<tr _afrrk="3" class="p_AFSelected p_AFFocused xem"><td nowrap="" _afrrh="true" class="xwl"><span style="white-space: nowrap"></span>&nbsp;</td><td style="padding:0px"><div style="position:relative;overflow:hidden;width:100%"><table summary="" style="table-layout: fixed; width: 1402px;" cellspacing="0" _afrit="1"><colgroup span="6"><col style="width:131px;"><col style="width:111px;"><col style="width:131px;"><col style="width:101px;"><col style="width: 767px;"><col style="width:161px;"></colgroup><tbody><tr><td style="width:120px;" nowrap="" class="xen"><span class="x2hg" style="white-space: nowrap"><a id="pt1:_FOr1:1:_FONSr2:0:_FOTsr1:0:AP1:AT1:_ATp:t2:3:cl22" class="xmv" onclick="this.focus();return false;" href="#">VISA14</a></span></td><td style="width:100px;" nowrap="" class="xen" title="Dubai Integrated Economic Zones Authority"><span class="x2hg" style="white-space: nowrap">Dubai Integrated Economic Zones Authority</span></td><td style="width:120px;" nowrap="" class="xen"><span class="x2hg" style="white-space: nowrap">01-Jul-2023</span></td><td style="width:90px;" nowrap="" class="xen"><span class="x2hg" style="white-space: nowrap">1</span></td><td style="width: 756px;" nowrap="" class="xen"><span class="x2hg" style="white-space: nowrap">VISA</span></td><td style="width:150px;" nowrap="" class="xen"><span class="x2hg" style="white-space: nowrap"><a id="pt1:_FOr1:1:_FONSr2:0:_FOTsr1:0:AP1:AT1:_ATp:t2:3:cl1" class="xmv" onclick="this.focus();return false;" href="#">TESTV (0 more)</a></span></td></tr></tbody></table></div></td></tr>

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Why don't you use the Excel actions for this? There is an action called Read from Excel worksheet that does exactly that.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • Jacklin_Jency Profile Picture
    31 on at

    1.png

    Hi Agnius,

    I have attached my flow above 

    I read from excel and store the value in the variable, so inside the loop it has to select the value of variable that in passed from excel which is dynamic.
    Suppose out of 5 rows I have to deal with only 2 rows where the value of that 2 rows (ie:VISA14,VISA13) is pulled from the excel and click on VISA14 & VISA13 only

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Okay, I misread that then.

    I would suggest using Extract data from web page to get the entire table. Then use Find or replace in data table to find the value you are looking for (the one from Excel). This will give you a variable called %DataTableMatches% that will contain the indexes for where the values you are looking for are in the data table from the web page.

    Then use those indexes as variables in your selector. See here for reference on how to add variables to selectors:  https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors#use-variables-in-a-custom-selector

    Also watch this video on building dynamic web selectors: https://youtu.be/2PcyBa22Jj8

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • Jacklin_Jency Profile Picture
    31 on at

    thanks Agnius
    will check with it 

  • Jacklin_Jency Profile Picture
    31 on at

    Hi Agnius,

    I work with the website where I have to scrap the data from the inner scrolling HTML table. But while extracting the data it scraps only the 1st set of data (data available before scrolling the page). How to capture the entire data in the inner html table or window ?? any guidance? It has got 100s of data on it.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It likely means that your data is also divided into some sort of sections, and not only rows. The section likely includes a certain number of items in it. If the Base CSS selector in your Extract data from web page action has the ordinal value ( :eq() ) of the specific section in it, it will only extract the items from that section. 

     

    Try making a copy of your Extract data from web page and use it to extract a few items that come right after those that are currently extracted successfully. Then compare the Base CSS selector of this copied action against the one from the original action. See if there are any values in the Base CSS selector that are different. Then try to make it so that it works for both sections. When you do that, it should work for all items.

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard