cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_kikilalaaa
Helper V
Helper V

Pass Variable to Another Screen

Hi all. I have 3 variable that I have set their default value in app: on start. 

However, when they clicked on certain screen, I want to update the variable and pass the updated var to next screen. So this is what i did:

 

Gallery. Onselect:

 

If (!varclick,
(UpdateContext({varBlock:"C"}),
UpdateContext({varVillage:"V1"}),
Navigate(V1C,ScreenTransition.Fade,
{varLevel:Text(ThisItem.Result)})),
Navigate('V1D List',ScreenTransition.Fade,
{varLevel:Text(ThisItem.Result)}))

 

But it seems like there's error in my coding.

can anyone helps?

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@_kikilalaaa 

For one thing, context variables , UpdateContext({}), cannot be set in the OnStart of an app.  You have to use Set() for that. Once, the variable is set, it must then use the Set() function to reset it throughout the app. You can't change a global variable with a context variable. 

View solution in original post

1 REPLY 1
Drrickryp
Super User
Super User

@_kikilalaaa 

For one thing, context variables , UpdateContext({}), cannot be set in the OnStart of an app.  You have to use Set() for that. Once, the variable is set, it must then use the Set() function to reset it throughout the app. You can't change a global variable with a context variable. 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,679)