Set Criteria

Tags:  

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 in the last 30 days.  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 Configuration tree. The Set Criteria dialog will be displayed.
  3. Select the 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 in the last 30 days, 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 in the last 30 days, as shown in the screen-shot below: 


To define slightly complex criteria, like having both a AND/OR operator or a combination of both, use the Advanced link in the Criteria dialog.  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 will be displayed on the right-side of the dialog for easy reference.

Another example of an advanced criteria using both AND and OR operator is given below:



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.




0 Comments  Show recent to old
Post a comment



 RSS of this page