How Do I Define Global Values that Can be Dynamically Defined and Accessible by Various Programs? (Magic xpa 3.x)
When you define variables and declare data sources in a Magic xpa task, those values are only visible to that task and to subtasks within the same program. However, sometimes you will need values that are available to all tasks within the project.
These global variables are entered the same way as any other variable, except that they are entered in the Main Program.
-
Go to the Program repository (Shift+F3).
-
Go to program #1, the Main Program.
-
Zoom (F5) to open the program.
-
Click on the Data View tab.
-
Proceed as you would for creating the data view in any other task.
Hint: You can link data sources in the Main Program. But be careful if you do, since it is not a table that is used by a lot of users as the Main Program stays resident for the user’s entire session. It is safer to use virtuals in the Main Program, and fetch or store the data in Task Prefix and Task Suffix.
How Do I Define a Program Data View?