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 / UI element CSS Selecto...
Power Automate
Answered

UI element CSS Selector with variable not working for Ordinal

(0) ShareShare
ReportReport
Posted on by 51

Hi,

I have a UI element that includes two variables as part of its CSS Selector. One is for the Type and the other is for the Ordinal. Resulting CSS is below.

 

button[Class="inline-button"][Type="%NewVar%"]:eq(%LoopIndex%)

 

I received the following error. The value for %NewVar% for Type is used, but the %LoopIndex% variable is not successful for the Ordinal. Is this a bug?

 

Element with selector 'button[Class="bg-transparent bn lh-solid pa0 sans-serif tc underline inline-button black pointer f6 ml1"][Type="button"]:eq(%LoopIndex%)' not found.

 

Thanks, 

John

I have the same question (0)
  • Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    Variables in the selector only works with custom mode activated. Did you turn it on?

  • jfk86d Profile Picture
    51 on at

    Hi @Henrik_M,

    Thank you for your reply. I think I have it on. I left the circled item below turned on. Is that what you mean?

     

    jfk86d_0-1642542614265.png

     

  • Verified answer
    Henrik_M Profile Picture
    2,021 Super User 2024 Season 1 on at

    No; needs to be to the left. Microsoft needs to hire someone who knows about user interfaces.

  • jfk86d Profile Picture
    51 on at

    @Henrik_M , Thank you that solved it!

  • 7ishty Profile Picture
    2 on at

    I am facing the same problem but I am not able to find "custom" button in my UI selector dialog box. Can you please help in it ?

  • jfk86d Profile Picture
    51 on at

    Hi @7ishty 

    It appears Microsoft fixed the poor UI and the custom button is gone. I have not revisited the Flow that used this variable in a selector, so I'm not sure of the solution for the updated interface. It also appears they updated the documentation for this screen. Maybe the answer is there? UI elements and controls - Power Automate | Microsoft Learn & Build a custom selector - Power Automate | Microsoft Learn Good luck and please post what you find as a solution. Thanks! John

  • wezhema Profile Picture
    31 on at

    Hey, I had the same issue but you have to enable the "Text Editor" at the top right, seems like the Custom button disappeared with the latest versions:

    wezhema_0-1674089103851.png

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 272 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 147 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard