Case variables are variables which are created inside a project and stored exclusively for each case. They are automatically created when a new case is initiated and can be used in any of the objects in a process. Case variables can be defined in the process designer, and can then be used to populate fields in DynaForms and throughout the process in Output Documents, triggers and email templates.
| Warning: Before creating a variable, read the rules in the Naming Variables section to name it properly. |
To define case variables, open the project in which they will be used. In the main toolbox, click on the + icon next to the "Variable" option.

Fill out information about the new variable in the modal window that opens:

| Warning: ProcessMaker does NOT support variables created with characters from Arabic, Hindi, Japanese or other languages that do not use the Latin alphabet. |

Note: A variable name must match the regular expression: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*



YYYY-MM-DD" or "YYYY-MM-DD HH:MM:SS". For example, the last second of the year 2015 is: "2015-12-31 23:59:59".


Note: This type of variable can also be related to the Subform's "Grid Store" property.



SELECT statement to populate the variable. Note that this statement is the default for controls which are associated with the variable, but this statement can be modified in the definition of each control. Do NOT include the name of the database in the query, since the query will be executed in the selected Database Connection (3). The SQL query is executed when a DynaForm is displayed which contains a control associated with the variable. If the SQL query contains a reference to an independent field (@@fieldId or @#fieldId), then it will be executed every time the value of the independent field is changed by the user.

The variable values of this list can be drag and drop to modify the order.

Boolean variables have options for the TRUE and FALSE keys. The label for each of these keys can be configured. Boolean variables can only be used with dropdown box, radio button and checkbox controls in DynaForms.
After filling out the information about the new variable, click on "Save" to add it to the list of available variables or "Cancel" to discard any changes.
Note: All variables for a case are stored in the MEDIUMTEXT fieldwf_<WORKSPACE>.APPLICATION.APP_DATA in the database, which holds a maximum of 16,777,213 bytes, so that the maximum number of characters in a string is determined by the size of that field, but can also be limited by the Size property of textboxes in DynaForms and by the post_max_size setting in the php.ini configuration file.
When a case variable is created, a second variable with a name based on the name of the case variable and the suffix _label is automatically created. For instance, if the new variable is named "phone", the second variable will be named "phone_label".
Warning: Avoid creating variables with a "_label" suffix in their name, it may lead to possible conflicts with variables created by the ProcessMaker application.
A _label variable is used to store the label of the variable stored in the @@variable related to a Dynaform control. For example: for a dropdown, the label of the selected option is saved as a variable with the same name as the case variable assigned to the dropdown, but with a "_label" suffix. If a dropdown box is named "MyDropdown", then the value of the selected option would be stored in the case variable @@MyDropdown, and the label of the selected option would be stored in the @@MyDropdown_label variable.
In the case of textboxes, textareas or suggest boxes, the same value typed in by the user is stored in the case variable, as well as in the _label variable.
The _label variable values are stored in the wf_<WORKSPACE>.APPLICATION.APP_DATA field in the ProcessMaker database.
To manage the list of variables and create new ones, click on the "Variables" option in the main toolbox.

A list of variables will appear along with options to add new variables and edit or delete the existing variables.

The variables are listed 10 at a time. To see the next page click on >, and to see the previous page click on <. To see other pages of variables, click on the page's number in the pagination control below the list.
To filter the list of variables, enter text in the search box in the upper left-hand corner. The search is case insensitive any where in the variable names or in their types.
After creating variables, they can to be associated with a control field in a DynaForm. To associate variables with fields in a DynaForm, check this documentation to learn how to do it.
Warning: Assigning the same variable to different controls in different Dynaforms may result in unexpected behaviors. For example, if a variable was first assigned to a dropdown and then to a textbox the label might change, as shown in the image below.

The variable value is "US" and its _label variable is "United States" in the dropdown of a first Dynaform. Once the case is routed to a second Dynaform, when the variable is assigned to a textbox, only the variable value ("US") will be displayed in the textbox. Once this textbox is submitted, the _label variable will change from "United States" to "US", because a textbox stores the same value in the variable value and its _label.
Even though some combinations might seem safe, it is not recommended to use the same variable with multiple control types.
Variables can also be created inside the DynaForm Designer, when dragging and dropping a control a new window will automatically appear.This window will be the "Create/Select" window and it has been added to aggregate functionality and behavior to the variables.

This new window will have two radio buttons offering two options which are: "Create variable" (creates a variable directly from this window) or "Select variable" (selects an existing process variable).

The "Create variable" option will allow the immediate creation of a variable by firstly adding a "Variable Name", for this example the variable will be "name".

Click the options "Settings" which is underlined and more options will be displayed.

The "Settings" available for the creation of variables are the following:

The "Type" setting is a dropdown which allows to choose the type of variable that will be used.This depends solely on the control chosen so the type of variable will change. In case is a "Textbox" control (like in the example below) the type of variable available will be "String", "Float" and "Integer". Try adding a "Datetime" control and the type of variable available will be only "datetime".

The "Database Connection" setting displays a connections already established with a Database or if empty create a new one. Read more about Database Connection on this section

The "Sql" setting adds a query to give more functionality to the control by clicking on the underlined ellipsis as seen in the image. For more information read this section

An "SQL Editor" will open where queries can be added.

Finally, the "Options" setting shows, edits and/or adds options set of the control that may be related to a variable or not. Check this section for more information.


If an existing variable wants to be added to the control simply click on the "Select variable" radio button.

All process variables will be displayed and one of them can be chosen for the control.

Automate your Workflow with Business Process Management
Privacy Statement
© Copyright 2000-2026 Decisions All rights reserved.

