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 / Dynamic UI Selector - ...
Power Automate
Answered

Dynamic UI Selector - Custom attribute

(0) ShareShare
ReportReport
Posted on by 8

Hi,

 

I have a question around selecting dynamic UI elements,

Please see my current flow and error, the selector does not appear to recognize my element. I think the syntax may be incorrect?

 

This is the element i am selecting, it is a dynamic element that changes frequently.

kngmkr_0-1679108854492.png

 

Inspect Element

 

 

<div class="indicator highlight" data-tooltip-config="table-indicator" data-tooltip-key="measure-table-first-119" data-tooltip-help-arg1="measure" data-tooltip-help-arg2="measureTargetIYCUnitTypeAllocationAtWorkstream" data-tooltip-help-arg3="true" data-tooltip-help-arg4="false"> A$m 45.000</div> 

 

 

 

I figured using the attribute "data-tooltop-help-arg2" would be good, as there is no ID attribute and it is unique.

 

kngmkr_1-1679108928407.png

 

kngmkr_2-1679108964493.png

 

However when i run the flow i get the below error;

kngmkr_3-1679108992943.png

 

 

Any ideas? The attribute doesnt come up in the selector, is it possible to add custom attributes? And if so, is my syntax correct?

 

Many thanks!

 

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

    Hi @kngmkr 

     

    Try this css selector

    div[class="indicator highlight"][data-tooltip-help-arg2*=KPIMetric]

     

     

     

  • kngmkr Profile Picture
    8 on at

    Hi @Nived_Nambiar 

     

    Same issue;

    Element with selector 'div[class="indicator highlight"][data-tooltip-help-arg2*="measureTargetIYCUnitTypeAllocationAtWorkstream"]' not found. 

     

    kngmkr_0-1679130126917.png

     

  • Aakashch_1998 Profile Picture
    40 on at

    Hi @kngmkr

     

    Try using this Selector

    if 'A$m' is constant
    div[data-tooltip-help-arg2="measureTargetIYCUnitTypeAllocationAtWorkstream"][Text^=A$m] 

     

    if only $ is constant
    div[data-tooltip-help-arg2="measureTargetIYCUnitTypeAllocationAtWorkstream"][Text*=$] 

     

    Thanks & Regards,

    Aakashch_1998 

     

     

     

     

     

     

     

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

    Hi @Aakashch_1998 

     

    Thanks for sharing this. I know there is a text attribute but wasn't aware that we can use contains / starts with or wildcard operations with that.

     

    I usually use the css or j query selectors here. 

     

  • kngmkr Profile Picture
    8 on at

    Hi @Aakashch_1998 

     

    Still fails using the text editor, I tried doing a couple tests with the default outcome and they work, any ideas?

     

    Fail to find element

    kngmkr_1-1679195483565.png

     

    Success

    kngmkr_2-1679195543360.png

     

    Success

    kngmkr_3-1679195576821.png

     

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

    Hi @kngmkr 

     

    Try this 

     

    div[data-tooltip-help-arg2="measureTargetIYCUnitTypeAllocationAtWorkstream"][Text*="A$m"]

     

    Nived_Nambiar_0-1679217987104.png

     

     

    If the above doesn't work, Try the below one

    div:contains("A$m") 

     

    Nived_Nambiar_1-1679218010046.png

     

     

  • Heather Profile Picture
    19 on at

    div[Class="IndicatorHighlight"][data-tooltip-help-arg2="measureTargetIYCUnitTypeAllocationAtWorkstream"]

    may also produce the result you're looking for

    Be sure to check that the state classes aren't being applied contrary to your selector definition.
    When you right click an element to inspect, it may force a highlight state that wouldn't otherwise be applied. Including attribute values such as those may make the elector more brittle than you intend.

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard