...
Reserved words to use in expressions:
* | To match all |
[empty] | To match empty values for particular field. Example: field1:[empty] - will match records where field1 is empty (does not have a value, but the form defines this field) |
[now] | Current time and date, useful with '<' and '>' for comparing with dates stored. Example: someDateField:<[now] - will match records where field 'someDateField' has value which is in the past compared to now (current time) |
[today] | Same as [now], but without time |
[tomorrow] | To compare against tomorrow's date. Also something like [today]+1 could be used instead |
[yesterday] | To compare against yesterday's date. Also something like [today]-1 could be used instead |
[dateyyyyMMdd] | To compare against given date in the format: yyyyMMdd, example: [date20150130] to give a date as Jan 30 2015 |
[datetimeyyyyMMdd HH:mm] | To compare against given date with time in the format: yyyyMMdd HH:mm, example: [date20151231 12:13] to give a date as Dec 31 2015 12:13 |
[date timetoday hh:mm] | You can use a shortcut to "today" with given construction |
'<' and '>' (and '<=' and '>=') | Can be used together with date and datetime fields, as well as to compare values for numeric fields stored |
! | To reverse the filter condition. Example: !field1:[empty] - will find records that have 'field1' field filled |
:this | In *views macros you can reference current user and current page as "this" (when used to filter user (and multiuser) and page (and autopage) field types respectfully),
Example:
thepage:thiscreatedBy:this
(thepage is the field of type Page and createdBy is a metadata field to hold created by info for given record). See more about metadata field and available field types in Documentation
Warning |
---|
From version 1.35 we start to deprecate support for ":this" in filters, as filters are now "context aware" and you can use as any other ConfiForms field to get, current user (User object), date (DateHolder) and page (Page object) where the filter is executed These "context fields" work with Virtual functions Code Block |
---|
--- format current date to day of week
_today.formatDate(u)
--- get current page ID
_page.id
--- some weird transformation example to get the page title and split it by spaces then join by a single quote
_page.displayTitle.split( ).asArray(')
--- get current user's location (through profile)
_user.asUserProfile.location |
Also, there is a "_count" field which holds the number of record in the current scope (might change in time while conditions get processed by a filter engine) That said, consider the following example: You have 5 records initially and the filter looks like will match all While the filter like this Code Block |
---|
somefield:hello AND _count:>4 |
will first try to find the matches for "hello" and then apply the other condition (and depending on matches on left-hand side of the query the count might be less than 4)
Warning |
---|
If you want to use the values of context field in your filters then you will need to use it through the [entry.fieldname] reference Something like: ownedBy:[entry._user] mypage:[entry._page.id] |
|
|
hasChanged(fieldName) Status |
---|
colour | Green |
---|
title | from v. 1.36 |
---|
|
| See explanation in Virtual functions Warning |
---|
This function is supported only when filter is used in condition field in IFTTT macro, as only in this case there is an information about the previous state of the record present in the context |
|
_previousState.fieldname | See hasChanged function in Virtual functions Warning |
---|
This function is supported only when filter is used in condition field in IFTTT macro, as only in this case there is an information about the previous state of the record present in the context |
You can access ANY property of the ConfiForms record that was there before the update. But ONLY in the IFTTT conditions |
Supports for "records count" evaluation Status |
---|
colour | Green |
---|
title | from v. 1.52.6 |
---|
|
| For example, this filter will check that the user can register not more than 2 records within 14 days Code Block |
---|
(createdBy:[entry._user] AND created:>([today]-14)):>2 |
So, the filter shall start with a parenthesis and end with a parenthesis followed by semicolon and expression Code Block |
---|
>
<
>=
<=
or just a number (to match exactly) |
This works in Field Definition Rules and allows you to have validation rules as dynamic as this |
...