Different Filter Expressions
This documentation will explain the three different types of filter expressions used within the BizzStream platform: Document Definitions with Reference Filter, Layouts with Dataset Filter, and Menus with Menu Block Filter. Each type serves a unique purpose in controlling data visibility and accessibility for your users.
Document Definitions: Reference Filter
Reference fields are often used in document definitions. They enable administrators to create dynamic models. If a reference field is used, the user will be able to select a related document from a dynamic picklist. The documents that are available for the user can be filtered by configuring a filter expression in the properties of the reference field.
How to use
- Navigate to your document definition.
- Select the "Reference" type field you wish to configure.
- In the field's properties panel, locate the "Filter" input area.
- Enter your filter expression here.
Example
To ensure that only active documents are shown, you can use:
status = 'active'
price >= 10
Layouts: Dataset Filter
Layouts are where you visualize and interact with your document data. The Dataset Filter allows you to apply a global filter to all the documents displayed within that specific layout. The main goal is to get a single document, or a filtered list of documents, depending on the type of dataset you have. If the filter on a document dataset doesn’t return a document, a new document will automatically be created.
How to use
Screens for document list dataset and document dataset are slightly different. For a document dataset the admin needs to select a get document method.
- Open the layout you want to modify.
- Select the dataset component that you want to set a filter for.
- In the properties panel for the dataset, find the "Filter" input field.
- Input your filter expression into this field.
Example
To display only documents that are created after a specific date can be set like this:
_createdOn > "2000-01-01"
Menus: Menu Block Filter
When a user clicks on a menu block, it displays a layout containing a document or multiple documents. Filters in a menu block are dataset filters. They filter the documents displayed within the menu block's associated layout. This allows for very specific filtering of the data presented through that menu block or using different previous menu blocks.
How to use
- Open the menu that contains the menu blocks you want to configure.
- Select the specific menu block with a layout that should have the filter.
- In the menu block's configuration, locate the "Filter" input field.
- Enter your filter expression here.
Example
This expression will filter the document by the _id in the selected line in the filter-grid control in the ingredients menu block.
_id IN {{SELECTED(M["ingredients"].CTRL["filter-grid"], "_id")}}