Transferring Data & Parameters Between Screens in PowerApps
If you’re new to PowerApps, be sure to read my brief introduction to PowerApps HERE
In this session, I want to show you how to transfer data between screens.
This assumes you have created a data connection (See also: Creating a connection to an Enterprise Gateway), and have brought some data into your app
(in my example, I’m referencing data in my data source – but this approach will also work as internal parameters as well)
So you’ve created a gallery with your data. You want to select your item, and move to a different screen and use the item you selected to display more information.
This is very straightforward.
Create the new screen you want to navigate to.
On your starting screen, create a button for navigating to your new screen.
Then, in the formula bar, create a Navigate function to move to the next screen.
However, we can add a further parameter to this function, named ‘Context’.
Using this, we can name, and then define, a parameter to pass to the next screen
In my example, my parameter name is TransID, and txtTransactionID.Text is a text field on my screen containing the TransactionID field from my dataset (the 5623 you see in the above image). Once done, we can hide this text box.
In your next screen, you can then reference this parameter. I’m using it to filter my dataset to show just the record selected by the user in the previous screen
I’ve created a ‘Browse Gallery’, and set my Items datasource as a filtered dataset
That’s all there is to it. Selecting an item on your first screen will then filter that value out on your second screen.