web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using variables to set...
Power Apps
Unanswered

Using variables to set properties od f control

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Is it possible to use a powerapps global variable to set the value of an input property of a control?

I have a control that take a string as input in property "name".

I have a global variables in my canvas app definer as Set(_name, "John Doe")

Can I set the input of my "name" property to _name?

I have tried but it seems that it does not resolve the value of the variable and breaks as _name is not a string, i.e. "_name"

Thanks!
I have the same question (0)
  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on at

    Hello @Jensschroder ,

    Considering that "name" is the property of your control (YourControl in example below), the following should work:

    YourControl.name=_name

    By the above, I mean: type "_name" (without quotes) in the "name" property field of your control.

    In this case, Set(_name, "John Doe") should cause your property to be set properly.

  • Jensschroder Profile Picture
    Microsoft Employee on at

    Hi  @dinusc ,

     

    Thanks! I figured it out my self. I was doing as you describe but had a bug in elsewhere that caused unexpected behaviour.

     

    Br,

    Jens

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard