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.


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.


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)


This post was originally published on this site

- Advertisement -spot_img


Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Create analytical presentations with Integrated Maps within Microsoft Dynamics 365!

30Sep September 30, 2023 General “Okay Jen, calm down, take a deep breath, and look at me. I am here to help...

More Articles Like This

- Advertisement -spot_img