cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Using variables to set properties od f control

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!
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

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.

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

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.

View solution in original post

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (7,149)