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

Re: Using variables to set properties od f control

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

Re: Using variables to set properties od f control

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
Microsoft
Microsoft

Re: Using variables to set properties od f control

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (6,428)