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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,116)