Form Design - Variables
The Variables tab on the form design of the DataBlock holds the following information:
- System Variables - variables that provide information on your system and environment, as well as the currently-running DataBlock or report.
- $Connection
- Driver
- DataSource - The data source of the database (unique to the driver).
- FileName - The main filename of the driver .dll file.
- Name - The friendly name of the driver.
- Version - The version number of the driver.
- Name - The name of the data connection in MAPS.
- Rule
- Class - The class of the connection rule used for authenticating the user.
- Id - The record ID of the rule.
- Name - The name of the connection rule.
- SqlFormat - The SQL format as specified in the data connection in MAPS.
- $DataBlock
- ActiveForm - The name of the currently-active form in the DataBlock.
- Author - The name of the user who created the DataBlock.
- CreateDate - The date the DataBlock was created.
- Description - The description of the DataBlock, as specified at the top of the screen when the DataBlock is selected.
- GUID - The unique identifier for this DataBlock.
- ModifyDate - The date the DataBlock was last modified.
- Name - The name of the DataBlock.
- Path - The path in Argos to the DataBlock.
- $Report
- Author - The name of the user who created the report.
- CreateDate - The date the report was created.
- Description - The description of the report, as specified at the top of the screen when the report is selected.
- GUID - The unique identifier for this report.
- ModifyDate - The date the report was last modified.
- Name - The name of the report.
- Path - The path in Argos to the report.
- $Schedule
- Author - The name of the user who created the schedule.
- CreateDate - The date the schedule was created.
- ModifyDate - The date the schedule was last modified.
- Name - The name of the schedule. When testing a schedule from within Argos, this variable will be set to "Test of <ScheduleName>" to indicate that the output is the result of a test execution.
- Note - The note associated with the schedule, as entered on General tab of the Edit Schedule dialog.
- Path - The path in Argos to the schedule.
- $Server
- Name - The name of the machine where MAPS is installed.
- SystemName - The name of this MAPS installation, as specified on the Universal Launcher screen of the MAPS Configuration.
- $User
- DbName - The username that this user is logging in to the database as.
- Description - Description of the user.
- EmailAddress - The user's email address.
- Name - The MAPS or LDAP username.
- UserType - The user's type.
- CustomField1, CustomField2, and CustomField3 - Custom user fields as defined in MAPS (Advanced user configuration or LDAP server configuration depending on user type).
- Control Variables - objects on the parameter form (labels, charts, listboxes, etc.).
- User Variables - SQL statements that are created by the user that do not reside on the parameter form.
- Manual Variables - variables that are created by the user that can be used for holding various types of data (numerics, strings, dates, etc). You can also create sub variables (and even a complex record structure) using manual variables.
Manage Variables Toolbar
Button | Name | Description |
---|---|---|
Add | Create a new manual variable or SQL variable. | |
Edit | Edit the properties of the currently selected variable. | |
Copy | Copies the currently selected variable to the clipboard. | |
Paste | Paste the copied variable from the clipboard. | |
Delete | Delete the currently selected variable. | |
Execution Order | Change the execution order of the variables. |
Adding Variables
To create a new variable, click the 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:
For more information see the SQL Editor page.
Manual Variable
Enter a name for your variable(s), and specify the data type and value:
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.
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.
If you need additional help creating DataBlocks, refer to the Getting Started with DataBlocks page.