Configured reports for conditions can either be based on Alfabet query language or native SQL.
configured reports can be structured in folders. You can create a folder containing your configured reports for conditions only. Right-click the root node of the explorer in the Reports tab of Alfabet Expand, select Create New Folder and change the default name of the folder.
In the Reports tab of Alfabet Expand, right-click the root node or the node of the report folder for condition reports and select Create New Report.
Click the new report in the explorer and set the relevant attributes:
Name: Define a technical name for the report without whitespaces and special characters. The name of the report is used in the selector of the condition to identify the report.
Category: Select a category defined for the use case Condition in the XML element UseCaseCategories.
Type: Select NativeSQL.
Native SQL Query: Define a native SQL query which only returns a result if a specific condition is fulfilled. You can use Alfabet query parameters to refer to the current environment of the user, like the object the user is currently working with.
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:
@ParameterName
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.
This setting is for the definition of a configured report executing a native SQL query. If you would like to execute an Alfabet query, set the Type attribute to Query and define the Alfabet query in the Alfabet Query attribute.
In the toolbar, click Save.
The following native SQL query only returns a result if the current object is active. It can be used in conditions for configuration elements to show them either if the query returns a result or if the query does not return a result: