Like parameters, variables are very helpful, and can be used to increase user communication in your app. A variable in Microsoft PowerApps is used with the function UpdateContext. Below are a few ways you can start using variables immediately in your apps.
User Communication
In a scenario where you’re sending data back to a source and doing a Patch, at times the user can be confused about what’s happening (if anything is going on at all). You might not want to take a user back to another page until the Patch is complete. To more effectively communicate to the user what is happening, try the following:
Now your user will see the button change text to let them know what is happening.
Sending Data from Page to Page
There may be times when you want the user to interact with data on screen 1, then pass some information to screen 2 based on an interaction on the first screen. This becomes useful when you have a list of items on the first screen, and you want to show details on the second screen. To try this out, use the following steps:
Navigate(Screen2,Fade,{MyVariable:dropdown1.Selected.Value})
Now you can pass variables from page to page. Variables will only live on that page that you are on. If you need global variables, then you can use a collection.
Written by Power User and Managing Partner Evan Chaki, this post was originally published on the Confluent blog. Browse the blog for additional PowerApps Pro Tips, and let us know what topic you'd like to see next!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.