Guest User

Untitled

a guest
Jan 22nd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. ## Field condition
  2.  
  3. #### Enum Operations
  4.  
  5. condition | expression
  6. ----------|-----------
  7. `is any of` | `{{prop}} in {{val}}`
  8. `is not any of` | `{{prop}} not in {{val}}`
  9.  
  10. #### Number Operations
  11.  
  12. condition | expression
  13. ----------|-----------
  14. `equals` | `{{prop}} == {{val}}`
  15. `not equals` | `{{prop}} != {{val}}`
  16. `equals or greater than` | `{{prop}} >= {{val}}`
  17. `greater than` | `{{prop}} > {{val}}`
  18. `equals or less than` | `{{prop}} <= {{val}}`
  19. `less than` | `{{prop}} < {{val}}`
  20. `is any of` | `{{prop}} in [{{extractList(val)}}]`
  21. `is not any of` | `{{prop}} not in [{{extractList(val)}}]`
  22. `is empty` | `{{prop}} == 0`
  23. `is not empty` | `{{prop}} != 0`
  24.  
  25. #### Sting Operations
  26.  
  27. condition | expression
  28. ----------|-----------
  29. `contains` | `{{prop}} matches containsRegExp({{val}})`
  30. `does not contain` | `{{prop}} not matches containsRegExp({{val}})`
  31. `is equal to` | `{{prop}} == {{val}}`
  32. `starts with` | `{{prop}} matches startWithRegExp({{val}})`
  33. `ends with` | `{{prop}} matches endWithRegExp({{val}})`
  34. `is any of` | `{{prop}} in [{{extractList(val)}}]`
  35. `is not any of` | `{{prop}} not in [{{extractList(val)}}]`
  36. `is empty` | `{{prop}} == ''`
  37. `is not empty` | `{{prop}} != ''`
  38. ;
  39. * `containsRegExp(value)` -- `new RegExp(escapeRegExp(value), 'i')`
  40. * `startWithRegExp(value)` -- `new RegExp('^' + escapeRegExp(value), 'i')`
  41. * `endWithRegExp(value)` -- `new RegExp(escapeRegExp(value) + '$', 'i')`
  42.  
  43. #### Date Operations
  44.  
  45. **note** we need to trim possible `time` part for both operands to compare only date part
  46.  
  47. condition | expression
  48. ----------|-----------
  49. `between` | `{{prop}} >= {{startVal}} and {{prop}} <= {{endVal}}`
  50. `not between` | `{{prop}} < {{startVal}} and {{prop}} > {{endVal}}`
  51. `later than` | `{{prop}} >= {{val}}`
  52. `earlier than` | `{{prop}} <= {{val}}`
  53. `equals` | `{{prop}} == {{val}}`
  54. `not equals` | `{{prop}} != {{val}}`
  55.  
  56. #### Date parts
  57.  
  58. condition | expression left part | expression right part
  59. ----------|----------------------|----------------------
  60. `value` | `{{prop}}` | `'yyyy-mm-dd'`, `now()`, `today()`, `startOfTheWeek()`, `startOfTheMonth()`, `startOfTheQuarter()`, `startOfTheYear()`, `currentMonthWithoutYear()`, `thisDayWithoutYear()`
  61. `day of week` | `dayOfWeek({{prop}})` | `1..7`, `currentDayOfWeek()`
  62. `week` | `week({{prop}})` | `1..53`, `currentWeek()`
  63. `day of month` | `dayOfMonth({{prop}})` | `1..31`, `currentDayOfMonth()`
  64. `month` | `month({{prop}})` | `1..12`, `currentMonth()`, `firstMonthOfCurrentQuarter()`
  65. `quarter` | `quarter({{prop}})` | `1..4`, `currentQuarter()`
  66. `day of year` | `dayOfYear({{prop}})` | `1..366`, `currentDayOfYear()`, `firstDayOfCurrentQuarter()`
  67. `year` | `year({{prop}})` | `'yyyy'`, `currentYear()`
  68.  
  69. #### DateTime Operations
  70.  
  71. condition | expression
  72. ----------|-----------
  73. `between` | `{{prop}} >= {{startVal}} and {{prop}} <= {{endVal}}`
  74. `not between` | `{{prop}} < {{startVal}} and {{prop}} > {{endVal}}`
  75. `later than` | `{{prop}} >= {{val}}`
  76. `earlier than` | `{{prop}} <= {{val}}`
  77. `equals` | `{{prop}} == {{val}}`
  78. `not equals` | `{{prop}} != {{val}}`
  79.  
  80. #### DateTime parts
  81.  
  82. condition | expression left part | expression right part
  83. ----------|----------------------|----------------------
  84. `value` | `{{prop}}` | `'yyyy-mm-ddThh:mm:ss[.mmm]'`, `now()`, `today()`, `startOfTheWeek()`, `startOfTheMonth()`, `startOfTheQuarter()`, `startOfTheYear()`, `currentMonthWithoutYear()`, `thisDayWithoutYear()`]
  85. `day of week` | `dayOfWeek({{prop}})` | `1..7`, `currentDayOfWeek()`
  86. `week` | `week({{prop}})` | `1..53`, `currentWeek()`
  87. `day of month` | `dayOfMonth({{prop}})` | `1..31`, `currentDayOfMonth()`
  88. `month` | `month({{prop}})` |`1..12`, `currentMonth()`, `firstMonthOfCurrentQuarter()`
  89. `quarter` | `quarter({{prop}})` | `1..4`, `currentQuarter()`
  90. `day of year` | `dayOfYear({{prop}})` | `1..366`, `currentDayOfYear()`, `firstDayOfCurrentQuarter()`
  91. `year` | `year({{prop}})` | `'yyyy'`, `currentYear()`
  92.  
  93.  
  94. ## Segment condition
  95.  
  96. Syntax has to be discussed
  97.  
  98. | expression |
  99. |------------|
  100. | `includeSegment(segment[9])` |
  101.  
  102. ## Activity condition
  103.  
  104. Check if the entity has of has not activity that matches the filter by its type and field condition
  105.  
  106. Has three parts
  107. - flag `Has not activity` or `Has activity`
  108. - filter by activity type (Call, Task, Email, Note, Calendar event)
  109. - condition for a field, for now available two fields in condition builder `Created at` and `Updated at`
  110.  
  111. Syntax has to be discussed
  112.  
  113. ## Dataaudit condition
  114.  
  115. Dataaudit condition can be applied only to auditable fields
  116.  
  117. Has three parts:
  118. - name of auditable field
  119. - Datetime condition for change
  120. - String condition new value (optional)
  121.  
  122. Syntax has to be discussed
  123.  
  124. ## Aggregation condition
  125.  
  126. Condition is based not on fields, but on columns of report that are defined in related section
  127.  
  128. Syntax has to be discussed
  129.  
  130. ```
  131. this.columns.totalSum > 4
  132. ```
  133. 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