Creator Help

Set Criteria

Overview

By default, all the entries in a Form will be displayed in the View. By setting criteria to the view, you can create views for specialized reporting needs. For example, in a Sales Database, display only the sales made in a specific region or in an Employee database, display only the employees who have joined on a particular date. The Criteria can be set from the GUI or by writing Deluge Script.

Set Criteria From GUI

    1. Select the view from the Views tab
    2. Select the option Set Criteria displayed in the View Configurationtree. The Set Criteria dialog will be displayed.
    3. Selectthe radio button Restricted Record and create the criteria by selecting the criteria field, operator and value. For example, to display the employees who belong to the "HR" department and joined on feb-01-2012, specify the criteria as shown in the screen-shot below.
    4. Click on the match all radio-button to display records that match both the conditions or the match any radio-button to display records that match any one condition.
    5. Click Done to add the criteria to the view. When you access the application, the Employee View will display the employees who belong to the HR department and joined on the particular date, as shown in the screen-shot below:


The Advanced link in the Criteria dialog can also be used to for applying a complex criteria like AND/OR operator or a combination of both. For example, in the Employee application let us create a view that will display only the personal details of the employee who is logged in. To add this criteria click on the Advanced link and specify the criteria as shown below, where zoho.loginuserid is the Deluge Variable that returns the login id of the user. The Deluge Field Names Deluge-System-Variables.html will be displayed on the right-side of the dialog for easy reference.

Set Criteria by Writing Deluge Script

The criteria specified in the GUI will be added to the view definition. You can view the definition by selecting More Actions -> View Definition from the View header. For example, the screen-shot given below is the view definition of the view named "HR employees joined in the last 30 days" whose criteria we defined in the GUI. Refer the topic Deluge Reference -> Criteria/ Filters in Views to learn more about creating views with criteria and filters using Deluge Scripting.

Top