Use a query to find one or more records in the database. The found records are the input for further processing.

You can use a query on a:

  • Workflow trigger of type Query to start a workflow based on the query results.
  • Document type perspective to define the scope of the perspective and the content of the document.
Optionally, you can run a query under specific conditions. For conditions, you can use functions.

Designer Designer Developer Developer Start Start Is a condition required  that uses a function  other than the  existing functions? Is a condition required  that uses a function  other than the  existing functions? Inform a developer on the  function class to be developed Inform a developer on the  function class to be developed Develop function class Develop function class You can use a function to fill the value of a condition.You can use a function for a condition on a query range.For a function, a class is required. To develop this class, extend the DQFFunctionRun class.Prerequisite: Develop the extension of the DQFFunctionRun class in the AOT before you start the steps.Note: The steps are to have the developed function class uploaded as function. Procedure 1. Go to Action and document management > Common > Functions. 2. Click Refresh. 3. Close the page. Inform the designer that  the function is available Inform the designer that  the function is available Create query - Wizard Create query - Wizard Use a query to find one or more records in the database. The found records are the input for further processing.You can use a query on a:Workflow trigger of type Query to start a workflow based on the query results.Document type perspective to define the scope of the perspective and the content of the document.This topic explains how to set up a query with the Query wizard.You can also start the query wizard from a:Workflow trigger of type Query.Document type perspective.Existing query to edit it. Procedure 1. Click Action and document management design. 2. Click Create query. 3. Sub-task: Define the basic settings for the query. 4. In the Query field, type a value. 5. In the Description field, type a value. 6. In the Number of records to show in preview field, enter a number. 7. Select Yes in the Select first only record field. 8. Select Yes in the Allow cross company field. 9. Click Next. 10. Sub-task: Select the applicable tables for the query. 11. The root table of the query always must be at the top of the list of selected tables. To make sure this is the case, you are advised to first select and add the root table. Then you can select and add other required tables in one go. In the Select the query tables pane, select the root table for the query Note: You can use filter options to find the desired table. 12. Click >. 13. In the Select the query tables pane, select the other tables to be added to the query. Note: You can select and add several tables in one go. 14. Click >. 15. Except for the root table, for all tables you must define the parent table. In the right pane, in the list, find and select the desired record. Note: The table hierarchy for the query must reflect the table hierarchy in the database. Click Table structure, to view the table relations for a selected table. 16. In the Parent field, enter or select a value. Note: You can only select a table as parent if it is also in the table selection of the query. 17. Click Next. 18. Sub-task: Review or add table relations. 19. In the left pane, find and select the desired child table. 20. Click Add. 21. In the Child field field, enter or select a field from the child table. 22. In the Parent field field, enter or select the related field from the parent table. Note: For each relation, you can define the relation settings: Query fetch mode, JOIN type, Level. 23. Click Next. 24. Sub-task: Select the fields to be shown for the query. 25. In the left pane, find and select the desired table. 26. In the Select query fields pane, find and select the desired fields to be added to the query. 27. Click >. Note: You can use the Up and Down buttons to arrange the fields in the desired sequence. 28. Select the Group by check box. 29. In the Aggregate field, select an option. 30. To review the query results in the preview, click Refresh. 31. Click Next. 32. Sub-task: Define ranges for the query. 33. In the left pane, find and select the desired table. 34. In the middle pane, find and select the fields for which you want to add a range. 35. Click >. 36. In the Condition type field, select an option. 37. For each added field, set the value for the condition. To set the value, you can use a fixed value, a function, or sometimes a built-in function. In the Value field, enter or select a value. Note: - For fields of type String or Date, some functions are already available as built-in function. For these fields, the Built-in functions tab is shown on the dialog. You can use these built-in functions to fill in the value of a condition. - If you use a (built-in) function, the function results are not shown in the preview. To show a value in the preview, fill in the Preview default value field. 38. Select the Apply null range values check box. 39. In the Preview default value field, type a value. 40. To review the query results in the preview, click Refresh. 41. Click Finish. End End

Activities

Name Responsible Description

Develop function class

Developer

You can use a function to fill the value of a condition.
You can use a function for a condition on a query range.
For a function, a class is required. To develop this class, extend the DQFFunctionRun class.
Prerequisite: Develop the extension of the DQFFunctionRun class in the AOT before you start the steps.
Note: The steps are to have the developed function class uploaded as function.

Create query - Wizard

Designer

Use a query to find one or more records in the database. The found records are the input for further processing.
You can use a query on a:
  • Workflow trigger of type Query to start a workflow based on the query results.
  • Document type perspective to define the scope of the perspective and the content of the document.
This topic explains how to set up a query with the Query wizard.
You can also start the query wizard from a:
  • Workflow trigger of type Query.
  • Document type perspective.
  • Existing query to edit it.

Activities

Name Responsible Description

Develop function class

Developer

You can use a function to fill the value of a condition.
You can use a function for a condition on a query range.
For a function, a class is required. To develop this class, extend the DQFFunctionRun class.
Prerequisite: Develop the extension of the DQFFunctionRun class in the AOT before you start the steps.
Note: The steps are to have the developed function class uploaded as function.

Create query - Wizard

Designer

Use a query to find one or more records in the database. The found records are the input for further processing.
You can use a query on a:
  • Workflow trigger of type Query to start a workflow based on the query results.
  • Document type perspective to define the scope of the perspective and the content of the document.
This topic explains how to set up a query with the Query wizard.
You can also start the query wizard from a:
  • Workflow trigger of type Query.
  • Document type perspective.
  • Existing query to edit it.
Related to Notes

Set up queries

 

Provide feedback