In a data view, you have two options to configure which records of a database are displayed:
- configure filters that apply to all end users in the same way, so all end users see the same records (filter by field value), or
- configure filters that display certain records only to certain end users, e.g., to display one’s own vacation requests only (filter by placeholder).
Filter by field value
To filter by field values, click the FILTER tab in the Data view configuration. Then, use the Rule Builder to configure the filter conditions.
These filter conditions determine which values a record needs to have in certain fields to be visible in the data view. In the value field, manually type values, reference parameters with the @-symbol, or use placeholders (see below). Input dates in the YYYY-MM-DD format (e.g., 2022-10-19).
Note that you can also build conditions with fields that are not displayed in the data view, e.g., you can choose to display only vacation requests with the status of Open, without presenting the field status itself.
Filter by placeholder
When building filter conditions for data views, the BRYTER platform provides two special placeholders that can be input into the value field of the condition builders:
- {{current_user_email}}: This placeholder will be replaced with the email address that the end user authenticated with. With this placeholder you can ensure that only authorized end users can view the records. Note that this placeholder does not work if the access to the data view is configured as Public.
- {{current_date}}: This placeholder will be replaced by the current date, 00:00:00 UTC. This allows you to build conditions that depend on time, e.g., only show vacation requests where the requested vacation has not yet started.
Filtering data views for end users
End users can also apply filters in the published data view to customize which records are displayed.
For more information, refer to the documentation on data view customization options for end users.