What are filters in the Back Office?

Filters in Betty Blocks are very useful. You can use a filter to get a specific object out of a model or a collection or you can filter your grid so that you can see exactly the objects you want to see. In this article, all different types of filters and how to use them will be explained.

Condition rows

Every filter is made out of condition rows, with these conditions rows you can set up your filter. A filter can consist out of 1 condition row but it is also possible to make a filter with a lot of them. By grouping condition rows together you can make a filter even more efficient.

Predicates

A predicate is a statement that will check your property. If a predicate results in true, the filter will show or fetch that property. If the statement is false, the filter will do nothing. Within Betty Blocks there are many different types of predicates that you can use.

How to filter data in a grid?

  1. Open the filters menu by clicking on the filters icon on the right side of the header.
  2. You can create a new filter by clicking on the New filter button.
  3. The filter menu will expand, you can create your filter in the expanded area.
  4. You can preview your filter by clicking on the Preview button.
  5. If you are happy with the results of your filter you can click on the Save button to save your filter.
  6. Now you can pick your filter on the left side of the filters menu.
  7. You can change the filter you selected by clicking on the Edit button.
  8. A default filter can be set by going into Builder Mode. Edit the grid you want to add a default filter to, by clicking on the gear icon on the left side of the header.
  9. You can choose the filter you want to set as default in the Default selected filter dropdown list.
  10. Click on the Save button to save the grid.
  11. Now the filter you selected will be used when you open the grid.
  12. If you want to get back to the normal view you can click on the All filter on the left side of the filters menu.