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

Using a context variable to hold the name of another context variable.

I don't think this is possible...But there are smarter people than me developing PowerApps.

I'd like to store the name of a context variable in a context variable so that I can pass it via Navigate(). The idea being that a screen may be called from different places and depending on where it is called from a different context variable may need to be updated.

The way I'm working arounf this at present is to pass a context variable and then evaluating that with a switch() statement to figure out which variable needs to be updated. This means that I have to manage change in two places. The calling screen and the called screen. It would be nice if there was an evaluate() function that I could use in an UpdateContext() statement. e.g.

Calling Screen: Navigate(MyScreen,none,{Variable_to_update:"MyContextVariable})

Called Screen: UpdateContext({Evaluate(Variable_to_Update):"New value"}) -> Which would be equivilent of UpdateContect({MyContextVariable:"New Value"})

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Using a context variable to hold the name of another context variable.

You're correct - this is currently not supported in PowerApps. The Switch statement is the best way to implement your scenario as of today.

 

You can consider voting up one of the features requests in the PowerApps Ideas board (like this one) that would allow what you want to be done.

View solution in original post

2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Using a context variable to hold the name of another context variable.

You're correct - this is currently not supported in PowerApps. The Switch statement is the best way to implement your scenario as of today.

 

You can consider voting up one of the features requests in the PowerApps Ideas board (like this one) that would allow what you want to be done.

View solution in original post

Dramus
Level: Powered On

Re: Using a context variable to hold the name of another context variable.

I am using the SWITCH() statement at the moment. Thank you.

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: 327 members 5,622 guests
Please welcome our newest community members: