There are two types of variables that are typically used within a Snapp MX application. They are called Login and Screen variables.
Login variables are global in scope, available for use in all application screens. They are initialized when a user is authenticated, hence the name. This authentication can take place through a Login screen or via a Pass-through function. You would use Login variables to store data that's required across many screens. An example might be a user's role, security level, or location. Login variables can be used within a Trigger condition statement to control screen access and/or to reconfigure screens. They can also be used to constrain the data presented within a component or list.
Screen variables, on the other hand, are local to the screen that they were defined for. They are either passed in from the previous screen or defined through a special Screen Variables function which is called prior to the screens displayed.
The variables passed in from the previous screen are called the Unique Id., Parent Id., and Other Info. These variables maintain the system's state, ensuring that the proper data is being presented. For example, when a user clicks on a List row, the next screen usually contains a form displaying the details of the selected record. This happens because the Unique Id. of the record is automatically passed to the form.
When data is not directly accessible by a screen, then a Screen Variables function must be created to retrieve it. In support, a Screen Variables function automatically receives the Unique Id., Parent Id., Other Info, as well as, Login variables. It is then a simple matter to create a SQL statement to grab the information required and then assign it to any newly defined Screen variables. An example, an employee's personal details probably would not contain information about how much they expensed that month. If this is the case then a Screen Variables function could be used to retrieve this information, making it also available for display.
For detailed instructions on how to create Login and Screen Variables go to Advanced Tutorials > Variables section within the Snapp MX Tutorials.