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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Demo Extravaganza Championship Voting Open

Voting Ends: October 30, 2019!

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 185 members 4,570 guests
Please welcome our newest community members: