cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KurtSchron
Frequent Visitor

Update Context Variable Object.Object Property

I have a Context Variable that is an Object with many properties. 

 

I have some text inputs that perform a Patch function OnChange of the input. 

 

What I would like to do is then update the Context Variable Object so if the user navigates to other pages that still use that context variable it is accurate. 

 

I've tried, 
UpdateContext( { GallerySelectedProject: Patch( GallerySelectedProject, {percent_to_close: Value(pctToCloseInput.Text) } ) } );
UpdateContext({GallerySelectedProject: {percent_to_close: Value(pctToCloseInput.Text) } });

Neither seem to work and start to throw a lot of errors as it appears that it is overwriting the whole context variable but I just want to update this one property. I looked at this page and either of these seem like they should work but they are not. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-updatecontext

 

Any help? 

2 REPLIES 2
Jeff_Thorpe
Super User
Super User

What does the object in the content variable look like?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

I set it when a user clicks on a gallery using the navigate, 

Navigate(ProjectDetails,ScreenTransition.Cover,{GallerySelectedProject: ThisItem, editFormStatus: false, varShowEstimateDetails: false})

 

It has many properties on that next page like, 

GallerySelectedProject.engineer = "Joe Smith"

GallerySelectedProject.opportunity = 10000

...

So an object like GallerySelectedProject{engineer: "Joe Smith", opportunity: 10000, .... }

 

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

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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 (66,541)