Alfabet query parameters
You can use Alfabet query parameters in both native SQL queries and Alfabet queries to refer to the current context in the Alfabet user interface. For example, to refer to the object the user is currently working with, the user executing the report, or the current workflow being executed in WHERE clauses. During execution of the Alfabet query, the Alfabet parameter is substituted with the current return value. If no value is returned, the Alfabet query is executed without the WHERE statement.
Write Alfabet parameters as:
For example:
- WHERE APPLICATIONGROUP.BELONGSTO CONTAINS @BASE
finds all application groups subordinate to the application group the user is currently working with on execution of a native SQL query.
The following Alfabet parameters can be used for Alfabet queries and native SQL queries:
| Parameter Name | Description |
|---|
| BASE | Returns the value of the REFSTR property of the current object. |
| CURRENT_PROFILE | Returns the value of the REFSTR property of the current user profile. |
| CURRENT_USER | Returns the value of the REFSTR property of the current user. |
| CURRENT_MANDATE | Returns the current mandate of the user. The Alfabet parameter can be used for example to limit search results to objects that are assigned to the mandate the user is currently logged in with, for example:
- ALFABET_QUERY_500
- FIND ICTObject
- WHERE ICTObject.MANDATEMASK CONTAINS @CURRENT_MANDATE
NOTE: The parameter CURRENT_MANDATE (and the whole statement it is used in) is ignored if the user has no mandate assigned or is working as mandate master. |
| CURRENT_CULTURE | Returns the Microsoft® Windows® Locale identifier (LCID) of the current culture of the Alfabet user interface.
Please note that the culture that is selected as default culture is always returned as 127, which means default, independent from the LCID of the culture. |
| TODAY | Returns the current date. |
| ALFA_SERVER_URL | Returns the value of the attribute Web Server of the server alias configuration of the Alfabet component processing the query. The attribute Web Server is editable in the Overview tab of the server alias configuration editor. |
| BASE<number> | For queries defined in the context of layered diagrams and grid reports only! If the report is configured to allow cascading queries, and more than one level of related objects us defined, BASE0 returns the value of the REFSTR property of the parent object in the directly superordinate level of the diagram. BASE1 returns the ancestor object in the level superordinate to the parent object level etc. |
| WIZARDBASE | For queries defined in the context of wizard configuration only! Return the value of the REFSTR property of the base object of the wizard. The base object of the wizard can be different from the base object of a wizard step. This parameter allows to refer to the base object of the wizard for example in pre-conditions of steps that have a different base object than the overall wizard. |
| WORKFLOW | For queries defined in the context of workflow configuration only! Returns the value of the REFSTR property of the workflow. Each workflow corresponds to an object Workflow in the Alfabet database. The parameter is useful when defining queries that refer to properties of the class Workflow, like for example the workflow owner or the workflow initiator. . |
| WORKFLOWBASE | For queries defined in the context of workflow configuration only! Returns the value of the REFSTR property of the base object of the workflow. The base object of the workflow can be different from the base object of a workflow step. This parameter allows to refer to the base object of the workflow for example in pre-conditions of steps that have a different base object than the overall workflow. |
| LAST_EXECUTION | For queries defined in the context of monitors only. Returns the date of the last execution of the monitor. |