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 Element (Us...
Power Automate
Unanswered

Dynamic UI Element (Use variable) Desktop

(0) ShareShare
ReportReport
Posted on by

Ok short but sweet. how the heck do you use a variable in the selector builder?, it seems not to parse it and is unable to find window.  To replicate

 

-Create a desktop flow

-Open a blank Excel doc

-Capture something from toolbar and click it

-Try running - runs fine

-create a variable with your workbook name (Book1)

-Now alter the UI element to use name and process

-Alter name to be contains with the value as your variable i.e. %MyWorkBookName%

-the connector should look like this:

:desktop > window[Name*="%ExcelWorkBookName%"][Process="EXCEL"]

-Now save it

-Try running - watch in amazement as it cant find the window

 

Any help appreciated!The story is I have many excel docs which have repeatable actions - i want 1 subflow per action that i can just pass workbook name to...

 

That siad i would love to call a different flow (not sub flow) although seems not possible in desktop, and even if it was the above issue still makes it impossible to have a modular approach!

 

Categories:
  • tweeter103 Profile Picture
    4 on at

    I have the same question. 

  • VJR Profile Picture
    7,635 on at

    Hi @tweeter103 

     

    Using variables in the selector works perfectly fine.

    Please make sure you are using the "Custom" toggle button.

     

    Also check this link

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Dynamic-Selector-variable-in-selector-in-Desktop-Automation/td-p/716646

     

     

    I am passing XYZ.xlsx to the MyWBName variable

    VJR_0-1639368469457.png

     

  • tweeter103 Profile Picture
    4 on at

    Hi VJR,

    Thank you and sorry for slow response.

    You are indeed quite correct, and it is straightforward.

    My problem was I had the "" and %% inside out.

    "%VariableName%" works correctly

    Thanks again.

    pt

  • Niraj466 Profile Picture
    73 on at

    I'm using variable to Attribute value. However, in text editor / preview Selector, the attribute name 'Ordinal" is not populating : 

    Niraj466_0-1665506760070.png

     

    The flow is not using the dynamic value from the variable. Do we have any other reason here?

     

     

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
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard