Power Community

Power Community

Pass Context Variables between Screens using Navigate Function

Use Case
We have a Gallery in our Browse Screen, and the Gallery has the List of Flavors, associated order numbers, and order dates. When we click on a Gallery Item, we will navigate to another screen to show all the orders of the selected Gallery Flavor. In this example, I am creating three types of variables: Table, Records, and Text and sending them along with the Navigation function, where I will use them in the All Orders Per Flavor screen.

1.PNG2.PNG

Browse Screen Formula
In the Right Arrow in the Gallery, I used the below Formula. Three context variables are created and only can be accessed in the ScreenSelectedItem. It is like we used the UpdateContext Function to create those three variables in the ScreenSelectedItem. You might ask why not use Global Variables using the Set Function. The reason is we don’t need to use our App resources to create Global variables for variables that we will only use on one screen.

3.PNG

All Orders Per Flavor Screen Formula
I have a Data Table Control on this screen, and in its Items, I used the Variable Name SelectedFlavorOrders. Also, in the Screen Header, I have a Lable Control, and I used this Formula: “All Orders of: ” & SelectedFlavor. << This is the 2nd Variable in my Navigate Function in the Browse Screen. On the bottom of the screen, I add a Gallery and inserted some label control to show the values of the Passed records in the SelectedRecord variable. The fourth variable is the Customer ID, and I am using this to overcome a multilevel relationship error when trying to get the Customer Name from the Customers Table. (Nothing here is really related to the purpose of this tutorial)

CLICK HERE TO WATCH THE TUTORIAL

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img
- Advertisement - Advertisement

Latest News

SharePoint Roadmap Pitstop: November 2022

Gobble, gobble - time to gobble up all the updates that landed for SharePoint and related tech in the...

More Articles Like This

- Advertisement -spot_img