--- title: "Variables" slug: "variables-3" updated: 2023-05-25T06:21:22Z published: 2023-05-25T06:21:22Z canonical: "help.pillir.io/variables-3" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Variables The flow of data throughout the project is governed by the variables and these variables form the core of executing the business logic for a particular App. The variables are available across the project and can be fetched in the **App Designer** as well as the **Integration builder** depending on screen flow and logic. ### Steps to create a new variable To create a variable in the APM, user must: - Open **Variable** section on the left of the APM screen. - Click the **+Add Variable** button. - Enter **Variable Name**. - Choose the **Type** of variable. - If it is a **Value**, select Data Type (string, number, or decimal) from the dropdown. - If it is a **Table**, define table keys with column names and their types. ![add-variable](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/add-variable.png) A table can have multiple key value pairs. This can be done by clicking the **+** button under the column name. ![add-variable-11aug-new](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/add-variable-11aug-new.png) Select the **Primary** key for any one column and **Apply** **Index** checkbox to retrieve data faster from the database. Note For Offline Apps, the variable can be saved only if the **Primary** key is set. For more information about Offline Apps, refer [Steps in Developing an Offline App](https://help.pillir.io/docs/steps-in-developing-an-offline-app). Once added, the variables are displayed in the variables section. The variables can be edited or deleted by clicking the ellipsis menu next to the variable. ![variable edit.png](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/variable%20edit.png) For variables in **Workflow Applications**, there is a **Persist** parameter available while creating a variable. ![Add variable-persist](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/Add%20variable-persist.png) **Persist** - The variable value is constant throughout the lifecycle of a workitem. It does not change when the work item moves from one lane to another. **Don't Persist** - The variable value may change when the workitem moves from one lane to another. *These variables are mostly used in Page components and are not available in APM components that are executed in workflow.* NOTE $count is a default parameter for all tables that records the length of the table. It is used to show the count or list of entries in the table. ![APM-variable-count](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/APM-variable-count.png)