Frankly, the readability of Power Apps source code is low, so I sometimes lose track of where global and context variables are “declared and used”.
This article shows how to check where variables are declared and used.
How to check with the latest Power Apps Studio
The latest Power Apps Studio is much easier to use, and you can see all the variables in the app from the “Variables” icon on the left side.
For example, if you open the Global Variables item, you will see that the following two variables are declared and used in the application,
glbVar2 : Declared by Button3.OnSelect in Screen0
glbVar : Declaration in App.OnStart
and if you open the Context Variables item, you will see that one variable each is used in Screen0 and Screen1.
Furthermore, since the “search” function is now available, it is possible to search for variables all at once like this if the variable naming conventions have been properly decided.
A replace function is also provided, so you can change the name of a variable at once when you “want to modify the name of a variable.
When you take over an application from another developer, you will probably first check to see what variables are being used, so this feature is very useful in such cases.
Related Articles
Click here to learn more about the use of variables such as global variables and context variables.
コメント