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 / ID on Label Not Button
Power Automate
Unanswered

ID on Label Not Button

(0) ShareShare
ReportReport
Posted on by

Hello, can someone help me progress this flow, I am thinking top down which is not working

 

In this dynamic list the button does not have an ID I can identify, but the associated label does

 

ukjglost_0-1712851049365.png

I would like to click the button where the label div title = "myVar"

 

Any guidance would be much appreciated

Ta

J

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @uk-jg-lost 

     

    You can use the javascript similar like below and set your title value into some variable and pass to javascript:

     

    Deenuji_0-1712852748910.png

     

    Javascript code:

     

    function ExecuteScript() { 
    // Find the div element with the title attribute set to "03.02 Academic"
    var divElement = document.querySelector('div[title="${Claimant}"]');
    
    // Find the button element preceding the div
    if (divElement && divElement.previousElementSibling && divElement.previousElementSibling.tagName === "BUTTON") {
    var buttonElement = divElement.previousElementSibling;
    
    // Trigger a click event on the button element
    buttonElement.click();
    }
    }

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

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

    Try this in selector @uk-jg-lost 

     

    Nived_Nambiar_0-1712855715168.png

     

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • JG-23070703-0 Profile Picture
    on at

    Thank you for the direction, albeit JavaScript is a new language to me I will give it a go 👍

  • JG-23070703-0 Profile Picture
    on at

    I continue to be challenged by UI Elements on this Webpage, I though I had it licked when I worked out the source of the rowid

    So I wrote the UI element like li[rowid=%myRowIDVar%] > div > button[type="button"]

    but it does not work

    If I type the the text  li[rowid="135"] > div > button[type="button"]

    And click Test it fails

    Very confused

     

    Screenshot 2024-04-15 151524.png

     

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @uk-jg-lost 

     

    I have created similar website for your understanding

    Deenuji_0-1713286901053.png


    And created the below flow to click my div button based li row id:

    Deenuji_1-1713286965750.png

    JavaScript used:

    Deenuji_2-1713287005417.png


    function ExecuteScript() { 
    document.querySelector('li[rowid="%KeyValue%"] button.selectItem').click();
    }

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

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

    Hi @uk-jg-lost 

    just want to check , does the approach suggested did work for you ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

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 227

#2
David_MA Profile Picture

David_MA 204 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 177

Last 30 days Overall leaderboard