CollectionsCollections Database

Views introduction

The app uses Views to filter data in a more advanced way.

A View allows to get all the documents matching specific conditions. For example, you can create a view called Recent books with a condition that matches books published after 2010.

Conditions

Conditions

Every condition is defined by a field (1), an operator (2) and a value (3).

Operators

In a condition, the operator defines the comparison type.

  • Equal to, Greater than, Less than. They compare numbers, strings, booleans, dates and other field types.
  • Contains. The condition is verified if the field's value contains the specified value. For example, Selection contains an item, Group contains a value, Text contains another text.
  • Empty. The condition is verified if the field's value is empty.

Combining views

You can combine multiple views through the exists operator.

The condition is verified if the linked document, defined by a document reference, exists in the secondary view.

Combining views

For example, you can get all the Books by young authors with the exists operator and a secondary view Young authors that gets only the authors born after the 1990.

Exists operator is available for one-to-many relationships (Documents field) in the following variants: One exists if at least one document exists, and None exists if no document exists.