cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jensschroder
Level: Powered On

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

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

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

Jensschroder
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 200 members 5,591 guests
Please welcome our newest community members: