cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sandier
Level: Powered On

UpdateContext Variable Doesn't Show up

Hello everyone,

 

For some reason the updatecontext doesn't seems to work right.

 

I have a button with the following command:

Onselect = UpdateContext( { Pagina: 1 } )

When i push the button while running the application, it correctly puts the 1 in the Variables "Pagina"

But when i want to show the 1 in a label, the label doesn't seem to find the variabel "Pagina"

 

Ookfoto.png

 

Is there any solution for this problem, or am I doing something wrong?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: UpdateContext Variable Doesn't Show up

I just tried to do it in PowerApps and it seems to work.

 

Create a button and label:

1.png

 

Enter the following forumula for On Select in Button:

UpdateContext({Pagina:1})

Here is the label:

2.png

 

Enter the following formula in the label Text :

Pagina

Seems to work as intended.

 

Also is your button and label on the same Screen? UpdateContext only works for the same screen as context variables are only local to one Screen

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Re: UpdateContext Variable Doesn't Show up

Judging by the screenshot you posted you put Pagin instead of Pagina

Sandier
Level: Powered On

Re: UpdateContext Variable Doesn't Show up

Even when i'm using Pagina as a whole, i'm getting the "Invalid name" error.
Anonymous
Not applicable

Re: UpdateContext Variable Doesn't Show up

I just tried to do it in PowerApps and it seems to work.

 

Create a button and label:

1.png

 

Enter the following forumula for On Select in Button:

UpdateContext({Pagina:1})

Here is the label:

2.png

 

Enter the following formula in the label Text :

Pagina

Seems to work as intended.

 

Also is your button and label on the same Screen? UpdateContext only works for the same screen as context variables are only local to one Screen

View solution in original post

Sandier
Level: Powered On

Re: UpdateContext Variable Doesn't Show up

I was using the command of the variable on the other screen OOPS.. Thanks for sorting my problem out! 🙂
Anonymous
Not applicable

Re: UpdateContext Variable Doesn't Show up

To set a variable in one screen and use it across different screens check out Collections:

 

https://powerapps.microsoft.com/en-us/tutorials/create-update-collection/

Sandier
Level: Powered On

Re: UpdateContext Variable Doesn't Show up

Thanks, the collections seems to work fine.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,099)