Managing Database Queries
Editing Database Queries
You do not have to select a node to edit database queries using this dialog box. You can create new expressions or delete and edit existing expressions.
To select a database query
- Select Edit database query in the Edit menu.
- Mark a database query list on the left-hand side of the Edit database queries dialog box.
- Perform one of the following tasks.
- Overwrite the database expression name in the Identifier.
- Enter explanatory text in Description.
- Edit the SQL expression.
- Select or deselect other dialog groups.
- Select all dialog groups or deselect them all.
- Test the expression by clicking on Test statement... and enter a parameter value in the next dialog box.
- Save the changes.
Loading a Historical Object State
You can reset the state of a database object in a collection if you have enable recording of historical data in the database.
To reset a database object to a previous state
- Enter a database collection.
For more information, see "Database Objects" as a collection.
- Add the action Load objects including history to an action node.
- Select the collection on this node.
- Select between two variations:
- Select Load a single object with its history to load the historical data for a single object.
Here, you can enter an object key (XObjectKey), which uniquely identifies the object.
- Select Load table with history to load the historical table data.
You can enter a column name and its value as limiting criterion here.
|
NOTE: Once historical object states are loaded as described, you can simply set the collection to any point in time within the loaded time period. |
- Add the action Set object to historical state on the action node.
- Select the collection.
- Enter the date under Date.
The collection is set to the state, which was current at that time.
Loading a Change History
A change history contain a list of all operations recorded on a defined amount of data. You can load a change history into a special collection type designed for the purpose.
To define a collection for a change history
- Open the module or component to which to add the collection.
- Select the Collections node with a right click.
- Select Change history.
- Enter the name for the new collection in Identifier.
- Select the type of change history in Type.
To load a change history
- Select an action node with a right click.
- Select Load change history.
- Select the collection you want under Collection.
- Select the type of change history defined on the collection in Type.
|
NOTE: The setting in Type must be identical for the collection and the change history to be loaded. |
- Enter the date up to which you want to load the change history in Load historical data back to (date).
- Select one of the following variations to continue:
- Enter the Web SQL expression for the (XObjectKey) object key of the relevant object. This loads the change history for an individual object.
- Enter the relevant table name to load the change history for a table or an assignment object.

|
Note: If you wish, you can also enter the column name and value for a filter condition. |
View Definitions
A collection layer view behaves in the same way as a database layer view. The content of the view is defined via a Web SQL expression. The view is updated during runtime. The view is automatically updated if the source data changes.
To add a view
- Select the Collections node with a right click.
- Select the action Add collection data view.
- Enter the name for the new collection in the Identifier text field.
- Enter the Web SQL expression for representing the view content in the View expression field.
|
Note: Add a property with the matching data type for every view property in Web Designer. |