To apply filter criteria on referenced entities in Data and Live Widgets.
- Filter Criteria option available for referenced fields.
- Preview of the where clause that will be built based on the specification.
- A WaveMaker Web Application, with a database imported (we are using the sample HR Database).
- Any Data and Live Widget bound to Employee CRUD variable.
Steps: We are using the example of a Live Form. Same can be implemented for Live Filter and Data Table with Quick Edit and Inline Editable layouts, with some changes as mentioned in the next section.
- Access the Advanced Settings dialog for the Live Form.
- From the Fields tab, select the Department field (referenced entity).
- Notice the Filter Criteria property. Click the Edit Criteria icon to access the Filter Criteria dialog.
- Here you can specify the conditions for applying the row filter on specified field values.
- Each condition is called a Criteria and multiple conditions can be categorized into a Group.
- Criteria/Groups can be joined by AND/OR expression.
- Filter conditions can be selected from the given drop down. The conditions are pre-populated based upon the filter field data type.
- Filter Criteria Preview gives you the filter expression based on the criteria and groups that you add.
- You can delete any criteria or group.
- You can see the query built for the field.
- When you preview the app, only the values satisfying the filter criteria will be available for selection.
The above process can be used for Data Table with Quick Edit and Inline Editable layouts and Live Filter with the following changes:
Quick Edit and Inline Editable Data Tables
- The Columns tab from the Advanced Setting dialog lists all the fields from the referenced entity.
- Filter Criteria option is available only for the primary key field, under Edit Mode.
- You might have to set the Widget to Select to enable the Filter Criteria option.
How-to use Filter in Live Variables
How to use Live Variable APIs
How to work with Notification Actions
How to work with Navigation Actions
How to work with Variables to access Queries and Procedures
How to work with Service Variables in a Form