Form Design - Variables

The Variables tab on the form design of the DataBlock holds the following information:

Manage Variables Toolbar

Button Name Description
Add button Add Create a new manual variable or SQL variable.
Edit button Edit Edit the properties of the currently selected variable.
Copy button Copy Copies the currently selected variable to the clipboard.
Paste button Paste Paste the copied variable from the clipboard.
Delete button Delete Delete the currently selected variable.
Change Execution Order button Execution Order Change the execution order of the variables.

This image is the Form Designer with the Variables tab selected.  System and user created variables are listed under this tab.

Adding Variables

To create a new variable, click the Add button and choose whether you want to specify the initial value of the variable manually or via SQL statement. This is the value that the variable has when the DataBlock first runs. The variable's value may be changed during execution of the DataBlock; for example, by an OnClick event associated with a dashboard object.

SQL Variable

Enter a SQL query that will retrieve the value to be stored in this variable:

Example SQL query: select * from dual

For more information see the SQL Editor page.

Manual Variable

Enter a name for your variable(s), and specify the data type and value:

Boolean variable "ShowFilter" used to indicate whether a 2nd filter is visible or not.

Naming Conventions

Argos variables can use most Unicode characters. The first character of a variable name must be an underscore (_), dollar-sign ($), or one of any of the Unicode characters in the character sets Lu, Ll, Lt, Lm, Lo, or Nl. Subsequent characters can consist of the same characters as the first character or any of the Unicode characters in the character sets Mn, Mc, Nd, Pc, or No. As a general rule, only system variables should begin with the '$' symbol, to indicate that this is a system variable.

Note that variable names are case sensitive. To ensure that variable names are typed correctly, you can use the Insert Variable button  in the SQL editor instead of typing it manually.

Specifying the query execution sequence

If you have a need to specify the order that queries are executed, click the blue up/down arrow within the Variables tab shown in the figure above. This will launch the Change Order dialog box shown below where you can change the execution order of the DataBlock variables. Use the arrows to move the variables up and down in the list.

This image shows the Change Order dialog box

It is important to note that some queries have “dependencies” that must be fulfilled before they can be executed. For example, a query may rely on some user input before it can run. These dependencies may modify the order of execution you define here.


Need More Help?

If you need additional help creating DataBlocks, refer to the Getting Started with DataBlocks page.