Creating Global Variables in AppMaster
Learn how to create global variables in AppMaster.

Global Variables in AppMaster allow you to store data in RAM, which significantly speeds up your work with the applications.
To create a global variable in the backend, go to the Business Logic/Global variables tab and click Create Global Variable

In the newly opened window, you can set the type of a variable, its name, and description and make it unchangeable (read-only).
To create a global variable for a web application’s frontend, you need to go into the web application editor, click the Global variables tab and then click the Create global variables button.

Settings are similar to what we have in the backend part.

To create a global variable in the mobile app, you need to go to the business processes tab (Global variables sections).

The variable settings are completely similar to the settings of the frontend and backend parts of your application. The value of a global variable can be set not only when creating it but also dynamically in with the use of business processes. Find the corresponding variable block in the business processes designer and drag it into the canvas.

The variable value can be defined with the use of the Set Variable block.

FAQ
Global variables store values in RAM so different parts of an AppMaster application can access them quickly. You can create them for the backend, web frontend, and mobile app.
Open Business Logic, choose Global variables, then click Create Global Variable. Set the type, name, description, and read-only option in the dialog.
Open the web application editor, select the Global variables tab, and click Create global variables. The setup fields match the backend version.
In the mobile app editor, open the Business processes tab and select the Global variables section. Create the variable and fill in the same settings used elsewhere.
Choose a type that matches the value you plan to store, then give the variable a clear name. Add a description when it helps other builders understand its purpose.
A read-only variable keeps its value from being changed after you set it. Use it for values that your application should expose but not modify during normal operation.
Yes. Create the variable first, then use the matching variable block in the Business Process Editor. Set Variable lets a process assign a new value while the app runs.
Drag the relevant global-variable block onto the Business Process Editor canvas. Use the Set Variable block to define the value you want the process to store.
Use global variables for data that multiple processes or screens need to access quickly during an application's runtime. Keep their purpose narrow so values stay easy to track.
No. Backend, web frontend, and mobile apps each have their own Global variables area. Create the variable in the part of the application where you need to use it.


