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 II
Super User II

@_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 II
Super User II

@_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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (75,484)