Creating Filters
5 minutes to read- In the Designer view, in your AppPage, select a report or a details/update form DataPart in which you want to filter data from a data source.
- In the right panel, in the Data filters section, click Set filters.
- In the Data filters panel, choose how you want to filter your report results:
- To create a single logical expression to filter the results, click Add filter.
- To create multiple, combined expressions for more complex data filtering logic, click Add grouping, and then click Add filter.
You can nest up to six levels DataPart filter groups within other groups to support your data filtering logic.
- In the configuration panel, in the Filter results by field step, click a data source field for which you want to define your filter.
For example, to display records that were created only on specific dates, click Date_Created. - In the Select filter type step, click the comparison method that you want to apply to your filter.
The list of available comparison types depends on the data type. For more information, see Comparison Types in Filters.
For example, to display records that were created before a specific date, click Is before. - In the Filter results by step, for date/time data type filters, in the Precision level list, select the accuracy with which to compare the date and time values.
For example, to display records that were created any time before a specific month, ignoring the day and time, for the Date_Created field, select Month. - In the Define value step, specify the target value against which you want to compare the data:
If… Then… If you want to filter data based on a specific static value, …perform the following actions:
- In the Select value type list, select Static value.
- In the value field, enter the value against which you want to compare the data.
If you want to filter data based on a field from another DataPart located on any AppPage, …perform the following actions:
- In the Select value type list, select DataPart field.
- In the Select DataPart field list, select the name of the field that you want to use in your filter by navigating to the correct AppPage and DataPart.
The fields are grouped by AppPage.
The following DataParts can send the field values to use for filtering criteria:- Search form
- Submit form
- Details/update form
- Tabular report
- Card report
Note: For search forms, you can only use the fields that are selected in the form. For other DataParts, you can use any data source field.
If you want to filter data based on a property of the user who is logged in,
Note: This option is available for protected segments only.
…perform the following actions:
- In the Select value type list, select Authenticated user field.
- In the value field, enter or select the name of the field that you want to use in your filter.
If you want to filter data based on an app parameter,
…perform the following actions:
- In the Select value type list, select App parameter.
- In the value field, enter or select the name of the parameter that you want to use in your filter, and then select what happens when the parameter has no value.
If you want to filter data based on a system parameter,
…perform the following actions:
- In the Select value type list, select System parameter.
To ensure that the data source field and the parameter type are compatible, the list of parameters is filtered to show only the applicable options. - In the value field, enter or select the parameter that you want to use in your filter.
- Click Save.
Result: Your filter appears in the Data filters panel. - Repeat steps 3 through 8 for all the filters that you want to define.
- If you have more than one condition, in the Data filters panel, expand the list of logical operators on the left, and then select the operator with which you want to combine the filters.
For example, to display only the results that meet all the criteria in the group, select AND. - In the lower-left corner of the Data filters panel, click Save to apply your filters.
Result: Depending on the value types in your filtering criteria, your DataPart displays the records that meet the criteria according to the following rules:- For static values, the AppPage applies your filtering criteria before the DataPart loads. The records that do not meet the criteria do not appear.
- For DataPart fields, your filtering criteria are applied based on the following events in the DataPart from which you source the field for comparison:
- Search form – after pressing the Search button
- Submit form – after pressing the Submit button
- Details/update form – after a record loads
- Tabular report – after clicking a row
- Card report – after clicking a card
When you modify your DataParts and data source fields, the following conditions affect your data filters:
- Duplicate DataParts and AppPages retain all the original filters.
- If you remove a DataPart, the filters that reference that DataPart are deleted.
- If you remove a field from a data source, the filters that reference this field are deleted.
- If you change the data source of a DataPart, the filters that reference this DataPart are deleted.