RETRIEVE command
Retrieve a value stored in the Control Totals Database using the RETRIEVE command.
You can also specify certain options such as how to determine the cycle for which you want to retrieve the data and how A&AS should behave if no value is found. Refer to the OPTIONS (GENLEVEL and NO_VALUE) topic for more information.
If you have stored a variable without specifying the Control Totals Field, then you should specify the same variable name to retrieve the value from the Control Totals Database.
For example, assume that your cycles (defined at the application level) increment monthly, and you want to retrieve last month’s sales totals and assign them to the PREV_MO_SALESTOT variable in your rule procedure. These sales totals were stored in the SALESTOT variable when the Task MonthlyTotals was executed last month with the fields shown in the STORE command topic.
The definition of your RETRIEVE command in the rule procedure would contain the following information:
|
Screen Label |
Value |
|---|---|
|
Comment |
Retrieves last month’s sales total from the Control Total Database field, CDB_SALESTOT for the region and office referenced by the REG_OFF key. Assigns this value to PREV_MO_SALESTOT. |
|
Task |
/ApplicationName/MonthlyTotals |
| Variable | PREV_MO_SALESTOT |
| Control Totals Field | CDB_SALESTOT |
| Advanced Options |
With the following options selected, and values specified as indicated:
|
| Key Fields | REG_OFF |
To define a RETRIEVE command that retrieves a previously stored Control Total from the Control Totals Database
The RETRIEVE command appears with the definition you specified in the list of rule procedure commands in the Working Canvas of the Rule Editor.