Info |
---|
This is a page to show how to use ConfiForms Filters by example |
ConfiForms filters is the core component of the app and is used absolutely everywhere where you need to describe a condition, filter the dataset or setup the behaviour (field and IFTTT rules)
In this example we will be more focused on filtering the data, but will also touch the basics of a conditionally applied rules
Let's consider these forms that will, logically, build the bookshelf. Each book can be taken for reading and returned when ready. We will have a form for storing this state and couple of forms to store the data about the book and the author(s)
ConfiForms Form Definition | ||||
---|---|---|---|---|
| ||||
ConfiForms Form Definition | ||
---|---|---|
| ||
ConfiForms Form Definition | ||||
---|---|---|---|---|
| ||||
All books
Table Filter | ||||||
---|---|---|---|---|---|---|
| ||||||
ConfiForms TableView | ||||||
| ||||||
Available books
ConfiForms TableView | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block |
---|
No filter, showing all books in the bookshelf |
Taken by me
ConfiForms TableView | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block |
---|
takenBy:[entry._user] |
The* - Will match the record(s) where the field "title" value starts with "The" text
ConfiForms TableView | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Code Block |
---|
book.title:The* |
Bridget* - Will match the record(s) where the field value starts with "Bridget" text
ConfiForms TableView | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Code Block |
---|
Bridget* |
Transformation of authors: book.authors.transform(lastName.append([entry.firstName.prepend(, )]))
*love - Will match the record(s) where the field value ends with "love" text
ConfiForms TableView | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Code Block |
---|
*love |
*and* - Will match the record(s) where the field value has "and" anywhere
ConfiForms TableView | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Code Block |
---|
*and* |
Match the record(s) where the field "author.dob" formatted value less than formatted date 01.01.1950
ConfiForms TableView | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Code Block |
---|
book.authors.dob.formatDate(yyyyMMdd):<19500101 |