Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Field condition
- #### Enum Operations
- condition | expression
- ----------|-----------
- `is any of` | `{{prop}} in {{val}}`
- `is not any of` | `{{prop}} not in {{val}}`
- #### Number Operations
- condition | expression
- ----------|-----------
- `equals` | `{{prop}} == {{val}}`
- `not equals` | `{{prop}} != {{val}}`
- `equals or greater than` | `{{prop}} >= {{val}}`
- `greater than` | `{{prop}} > {{val}}`
- `equals or less than` | `{{prop}} <= {{val}}`
- `less than` | `{{prop}} < {{val}}`
- `is any of` | `{{prop}} in [{{extractList(val)}}]`
- `is not any of` | `{{prop}} not in [{{extractList(val)}}]`
- `is empty` | `{{prop}} == 0`
- `is not empty` | `{{prop}} != 0`
- #### Sting Operations
- condition | expression
- ----------|-----------
- `contains` | `{{prop}} matches containsRegExp({{val}})`
- `does not contain` | `{{prop}} not matches containsRegExp({{val}})`
- `is equal to` | `{{prop}} == {{val}}`
- `starts with` | `{{prop}} matches startWithRegExp({{val}})`
- `ends with` | `{{prop}} matches endWithRegExp({{val}})`
- `is any of` | `{{prop}} in [{{extractList(val)}}]`
- `is not any of` | `{{prop}} not in [{{extractList(val)}}]`
- `is empty` | `{{prop}} == ''`
- `is not empty` | `{{prop}} != ''`
- ;
- * `containsRegExp(value)` -- `new RegExp(escapeRegExp(value), 'i')`
- * `startWithRegExp(value)` -- `new RegExp('^' + escapeRegExp(value), 'i')`
- * `endWithRegExp(value)` -- `new RegExp(escapeRegExp(value) + '$', 'i')`
- #### Date Operations
- **note** we need to trim possible `time` part for both operands to compare only date part
- condition | expression
- ----------|-----------
- `between` | `{{prop}} >= {{startVal}} and {{prop}} <= {{endVal}}`
- `not between` | `{{prop}} < {{startVal}} and {{prop}} > {{endVal}}`
- `later than` | `{{prop}} >= {{val}}`
- `earlier than` | `{{prop}} <= {{val}}`
- `equals` | `{{prop}} == {{val}}`
- `not equals` | `{{prop}} != {{val}}`
- #### Date parts
- condition | expression left part | expression right part
- ----------|----------------------|----------------------
- `value` | `{{prop}}` | `'yyyy-mm-dd'`, `now()`, `today()`, `startOfTheWeek()`, `startOfTheMonth()`, `startOfTheQuarter()`, `startOfTheYear()`, `currentMonthWithoutYear()`, `thisDayWithoutYear()`
- `day of week` | `dayOfWeek({{prop}})` | `1..7`, `currentDayOfWeek()`
- `week` | `week({{prop}})` | `1..53`, `currentWeek()`
- `day of month` | `dayOfMonth({{prop}})` | `1..31`, `currentDayOfMonth()`
- `month` | `month({{prop}})` | `1..12`, `currentMonth()`, `firstMonthOfCurrentQuarter()`
- `quarter` | `quarter({{prop}})` | `1..4`, `currentQuarter()`
- `day of year` | `dayOfYear({{prop}})` | `1..366`, `currentDayOfYear()`, `firstDayOfCurrentQuarter()`
- `year` | `year({{prop}})` | `'yyyy'`, `currentYear()`
- #### DateTime Operations
- condition | expression
- ----------|-----------
- `between` | `{{prop}} >= {{startVal}} and {{prop}} <= {{endVal}}`
- `not between` | `{{prop}} < {{startVal}} and {{prop}} > {{endVal}}`
- `later than` | `{{prop}} >= {{val}}`
- `earlier than` | `{{prop}} <= {{val}}`
- `equals` | `{{prop}} == {{val}}`
- `not equals` | `{{prop}} != {{val}}`
- #### DateTime parts
- condition | expression left part | expression right part
- ----------|----------------------|----------------------
- `value` | `{{prop}}` | `'yyyy-mm-ddThh:mm:ss[.mmm]'`, `now()`, `today()`, `startOfTheWeek()`, `startOfTheMonth()`, `startOfTheQuarter()`, `startOfTheYear()`, `currentMonthWithoutYear()`, `thisDayWithoutYear()`]
- `day of week` | `dayOfWeek({{prop}})` | `1..7`, `currentDayOfWeek()`
- `week` | `week({{prop}})` | `1..53`, `currentWeek()`
- `day of month` | `dayOfMonth({{prop}})` | `1..31`, `currentDayOfMonth()`
- `month` | `month({{prop}})` |`1..12`, `currentMonth()`, `firstMonthOfCurrentQuarter()`
- `quarter` | `quarter({{prop}})` | `1..4`, `currentQuarter()`
- `day of year` | `dayOfYear({{prop}})` | `1..366`, `currentDayOfYear()`, `firstDayOfCurrentQuarter()`
- `year` | `year({{prop}})` | `'yyyy'`, `currentYear()`
- ## Segment condition
- Syntax has to be discussed
- | expression |
- |------------|
- | `includeSegment(segment[9])` |
- ## Activity condition
- Check if the entity has of has not activity that matches the filter by its type and field condition
- Has three parts
- - flag `Has not activity` or `Has activity`
- - filter by activity type (Call, Task, Email, Note, Calendar event)
- - condition for a field, for now available two fields in condition builder `Created at` and `Updated at`
- Syntax has to be discussed
- ## Dataaudit condition
- Dataaudit condition can be applied only to auditable fields
- Has three parts:
- - name of auditable field
- - Datetime condition for change
- - String condition new value (optional)
- Syntax has to be discussed
- ## Aggregation condition
- Condition is based not on fields, but on columns of report that are defined in related section
- Syntax has to be discussed
- ```
- this.columns.totalSum > 4
- ```
- Where `this` references on current record (the report), `totalSum` is a column name that is defined with aggregation function
Add Comment
Please, Sign In to add comment