What are conditions
Conditions are parameters established on fields to filter query results. R2 Docuo allows you to establish various types of conditions so that queries can be adapted to the needs of each user.
How to set conditions in field and condition queries
R2 Docuo allows you to set conditions for various fields at once so that you can create a specific query for the area of work.
In the example below, we create a query to show offers accepted for an amount greater than €1,000.
For the document to appear in the results list, the query must fulfill the following three conditions:
- Show only documents in the "Offers" category.
- Show only offers in the "Offer Accepted" state.
- Show only offers for amounts greater than €1,000.
Conditions are added from the queries window by selecting the field with a right click of the mouse.
For the query to show only documents belonging to the Offers category, you will need to select the "Category" field and set a new condition with the operator "Like" and the value "Offers".
Clicking OK will add the condition and the query will only display documents from the Offers category.
To make sure that it only displays accepted offers, you need to click the "State" field and add a condition.
Select the operator "Like" and the Value "Offer Accepted"
Now the query will display all documents belonging to the Offers category in the "Offer Accepted" state.
For the query to show only those offers greater than €1,000, select the Cost field and add a condition.
As the operator select "Greater than or equal to" and as the value used to be filtered, enter "1000" in this case.
Adding these conditions will produce a query that shows all offers accepted with a cost greater than €1,000.
Conditions asked when opening the query
All conditions have the option of asking for the value when the query is opened instead of having to enter a fixed value in the value field.
Therefore, continuing with the example above, you can create a query that shows all accepted offers but that will ask for the cost of the offers to be shown when the query is opened.
To ask the question when the query is opened simply check the box that appears at the bottom of the Condition window.
As of now, when you run the query a dialog box will open to establish the cost of the offers to be displayed. Enter the value you want to use to filter the query in the text box.
When you click OK, the results list will show only offers greater than or equal to € 1,000.