Hi All,
Quick Question. I understand the in PowerApps we can use the following variable types:
My Main Question is what is the benefits of using a Context Variable and passing it to another screen using Navigate() over using a global variable in the first place? Is there a performance gain?
At the moment I seem to using Global for all except for a temporary or counter value. I'm not sure if there is even a reason not to use Global for everything. Is there any notion of a best practice for variables?
Thanks,
Nicky
Solved! Go to Solution.
Hi @OneThing,
I think your thought is proper. Using a Global variable (using Set() function) has a better performance than Context variable (using UpdateContext() function) within a canvas app.
It is a performance tip for canvas app that, to pass the app’s state from one screen to another, create or modify a global variable value by using the Set function instead of by using the Navigate and UpdateContext) functions.
Please check the following article for more details:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips#use-global-variables
Best regards,
Kris
Hi @OneThing,
I think your thought is proper. Using a Global variable (using Set() function) has a better performance than Context variable (using UpdateContext() function) within a canvas app.
It is a performance tip for canvas app that, to pass the app’s state from one screen to another, create or modify a global variable value by using the Set function instead of by using the Navigate and UpdateContext) functions.
Please check the following article for more details:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips#use-global-variables
Best regards,
Kris
Hi Kris,
Thanks for the feedback and especially the link. I've never seen this page, and there are a few questions I've had regarding performance, that this has given me more information on.
Many Thanks,
Nicky
User | Count |
---|---|
183 | |
123 | |
88 | |
45 | |
42 |
User | Count |
---|---|
254 | |
160 | |
126 | |
78 | |
73 |