Child pages
  • ConfiForms Filters by example

This is the documentation for ConfiForms Server/Data Center app

However, this might also work for ConfiForms cloud and in most cases it does. But please see this page to understand the differences between server and cloud versions of the ConfiForms app.

This is valid for ConfiForms cloud!



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)


We have 3 forms

  • bookshelf
  • books
  • author

linked together using smart fields (see how on the right, in data structures section)


So, one book may have multiple authors and is on a bookshelf




Data structures:

Form: bookshelf

bookSmart dropdown referencing form "books", and showing "book title"
status

Dropdown field

IDLabel
availAvailable
lostLost
takenTaken
takeBook

Action button to take the book, sets

status=taken&takenBy=[entry._user]
returnBook

Action button to return the book, sets 

status=avail&takenBy=
takenByUser
Form: books

titleText field holding a book title
authors

Smart multi-select field referencing "authors" form and showing authors last name and first name

[entry.lastName], [entry.firstName]

Form "books" has an IFTTT rule to "auto-create" a record in the "bookshelf" form when a new book is added


Form: author

firstNameText field holding author's first name
lastNameTest field holding author's last name
dob

Simple date to store author's "date of birth"

Filters by example:

To show all books, we will leave filter property empty

Book

Authors

Status

Mad About the Boy Taken
Still Me Available
An American Marriage Available
Us Against You Available
Nine Perfect Strangers Available
An Absolutely Remarkable Thing Available
Killing Commendatore Available
There There Available
Girls Burn Brighter Available
All We Ever Wanted Available
After Dark Available
Colorless Tsukuru Tazaki and His Years of Pilgrimage Available
The Giver of Stars Taken
One Plus One Available
The Girl You Left Behind Available
The Ship of Brides Available
Silver Bay Available
Three Wishes Available
The Husband's Secret Available
Truly Madly Guilty Available
Bridget Jones's Diary Available
Bridget Jones: The Edge of Reason Available
Cause Celeb Available
New Beginnings Available
The Untelling Taken
Silver Sparrow Taken
Leaving Atlanta Available
Pride and Prejudice Available
Baby Proof Available
Heart of the Matter Available
First Comes Love Available
Eat, Pray, Love Taken
The Glass Castle Available
The Diary of a Young Girl Available
City of Girls Available



No filter, showing all books in the bookshelf

To show only available books we should use for filter expression: status:avail, where status is the field name of bookshelf form and avail is the id of one of the status values in dropdown list

Book

Status

Still Me Available
An American Marriage Available
Us Against You Available
Nine Perfect Strangers Available
An Absolutely Remarkable Thing Available
Killing Commendatore Available
There There Available
Girls Burn Brighter Available
All We Ever Wanted Available
After Dark Available
Colorless Tsukuru Tazaki and His Years of Pilgrimage Available
One Plus One Available
The Girl You Left Behind Available
The Ship of Brides Available
Silver Bay Available
Three Wishes Available
The Husband's Secret Available
Truly Madly Guilty Available
Bridget Jones's Diary Available
Bridget Jones: The Edge of Reason Available
Cause Celeb Available
New Beginnings Available
Leaving Atlanta Available
Pride and Prejudice Available
Baby Proof Available
Heart of the Matter Available
First Comes Love Available
The Glass Castle Available
The Diary of a Young Girl Available
City of Girls Available



status:avail

To show books taken only by current user, we should use for filter expression: takenBy:[entry._user], where takenBy is the field name and _user is built-in property of form to get value of current user

Book

Authors

Status

Still Me Available
An American Marriage Available
Us Against You Available
Nine Perfect Strangers Available
An Absolutely Remarkable Thing Available
Killing Commendatore Available
There There Available
Girls Burn Brighter Available
All We Ever Wanted Available
After Dark Available
Colorless Tsukuru Tazaki and His Years of Pilgrimage Available
One Plus One Available
The Girl You Left Behind Available
The Ship of Brides Available
Silver Bay Available
Three Wishes Available
The Husband's Secret Available
Truly Madly Guilty Available
Bridget Jones's Diary Available
Bridget Jones: The Edge of Reason Available
Cause Celeb Available
New Beginnings Available
Leaving Atlanta Available
Pride and Prejudice Available
Baby Proof Available
Heart of the Matter Available
First Comes Love Available
The Glass Castle Available
The Diary of a Young Girl Available
City of Girls Available



takenBy:[entry._user]

To find books which title starts from word "The", we should use for filter expression: The* 

Book

Status

There There Available
The Giver of Stars Taken
The Girl You Left Behind Available
The Ship of Brides Available
The Husband's Secret Available
The Untelling Taken
The Glass Castle Available



book.title:The*



To find books which any field starts from word "Bridget'', we should use for filter expression: Bridget* 

Book

Authors

Status

Bridget Jones's Diary [Fielding, Helen] Available
Bridget Jones: The Edge of Reason [Fielding, Helen] Available



Bridget*

Transformation of authors:  book.authors.transform(lastName.append([entry.firstName.prepend(, )]))

To find books which any field ends with word "love", we should use for filter expression: * love

Book

Status

First Comes Love Available
Eat, Pray, Love Taken



*love



To find books which any field contains word "and", we should use for filter expression: *and*

Book

Status

Colorless Tsukuru Tazaki and His Years of Pilgrimage Available
The Husband's Secret Available
Pride and Prejudice Available



*and*

To find books which authors born before 01.01.1950, we should use for filter expression:  book.authors.dob.formatDate(yyyyMMdd):<19500101 , where book. is the bookshelf form's field of Smart Dropdown type, which is reference to books form record and authors. in its turn is the books form's field of Smart Multiselect type, which is reference to author form record and dob is the field name of author form, which is transformed by virtual function formatDate.

Book

Status

After Dark Available
Colorless Tsukuru Tazaki and His Years of Pilgrimage Available



book.authors.dob.formatDate(yyyyMMdd):<19500101

To find books which status is Available and title starts with word 'The', we should use for filter expression logical operations: 

book.title:The* AND status:avail

Book

Authors

Status

There There Available
The Girl You Left Behind Available
The Ship of Brides Available
The Husband's Secret Available
The Glass Castle Available



book.title:The* AND status:avail

To find books which title starts with word 'The' or available books of Jojo Moyes, we should use for filter expression logical operations: 

book.title:The* OR book.authors.lastName:Moyes AND status:avail

Book

Authors

Status

There There Available
The Giver of Stars Taken
The Girl You Left Behind Available
The Ship of Brides Available
The Husband's Secret Available
The Untelling Taken
The Glass Castle Available
Still Me Available
One Plus One Available
Silver Bay Available
Books found: 10



book.title:The* OR book.authors.lastName:Moyes AND status:avail

To find books that were registered without authors, we should use for filter expression: book.authors:[empty]

Book

Authors

Status

The Glass Castle Available
The Diary of a Young Girl Available



book.authors:[empty]

To find books that were registered today, we should use for filter expression:  created:[today]

Book

Authors

Status

You have not took any books yet



created:[today]

To find books with more than one author, we should use virtual function asCount in filter expression: book.authors.asCount:>1

Book

Authors

Status

Killing Commendatore Available



book.authors.asCount:>1

To find books with only single author, we will use symbol ! to reverse the previous expression in filter: !book.authors.asCount:>1

Book

Authors

Status

Mad About the Boy Taken
Still Me Available
An American Marriage Available
Us Against You Available
Nine Perfect Strangers Available
An Absolutely Remarkable Thing Available
There There Available
Girls Burn Brighter Available
All We Ever Wanted Available
After Dark Available
Colorless Tsukuru Tazaki and His Years of Pilgrimage Available
The Giver of Stars Taken
One Plus One Available
The Girl You Left Behind Available
The Ship of Brides Available
Silver Bay Available
Three Wishes Available
The Husband's Secret Available
Truly Madly Guilty Available
Bridget Jones's Diary Available
Bridget Jones: The Edge of Reason Available
Cause Celeb Available
New Beginnings Available
The Untelling Taken
Silver Sparrow Taken
Leaving Atlanta Available
Pride and Prejudice Available
Baby Proof Available
Heart of the Matter Available
First Comes Love Available
Eat, Pray, Love Taken
The Glass Castle Available
The Diary of a Young Girl Available
City of Girls Available
Books found: 34



!book.authors.asCount:>1

Show taken books only for logged in users

Book

Authors

Status

You have not took any books yet

Books found: 0
status:taken AND !_user:""

More examples coming soon! Need help with filtering or wondering how to get the certain data from bookshelf forms? Let us know and we will be happy to help and add your example here!

Click "Get support" button on the right and send us a message!

  • No labels