Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Power Automate Desktop
Answered

Can I set a variable on an element from UI

Like (0) ShareShare
ReportReport
Posted on 9 Nov 2024 00:46:48 by 73
Hey there,
 
I tried to set up a variable for an element from UI, so I can execute the other steps on variable. Do you know how to do that? 

Want to rename the file I selected. I know I can dump the source of that file into that, But in real life, I have to click UI to capture that file. (see below steps I created)
 
Do you know how? Thanks a lot!


I just  added attribute Id is equal to the new variable name I will use set variable. but that doesn't work. it said it could not rename the file, since it didn't figure out the file based on the variable i set. 
Categories:
  • Verified answer
    eetuRobo Profile Picture
    3,273 Super User 2025 Season 1 on 09 Nov 2024 at 06:24:37
    Can I set a variable on an element from UI
    The UI element selector only selects UI elements. You can’t set variable from that. It’s a blueprint for the PAD to find the correct element. When you use variable in the Id attributes value then PAD is trying to find element that has that id of the variable you gave it. And since your %NewVar% is not yet set to anything its trying to find an element with empty Id.

    If you want to extract the Id of a certain element into a variable use “Get details of the UI element in window” -action. Then set the attribute to Id . You need to write the Id in the Attribute name -field since its not one of the four default attributes in the drop down menu.




    For example I extracted Id from Microsoft Stores Adobe reader


    Result:

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 10 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 6

Overall leaderboard