Version: 18.11 (EOL)
Expressions
Three types of expressions can be used within a Workspaces configuration:
- env variables
- dynamic variables
- helper functions
Env variables
Env variables are interpolated as soon as the JSON is received on the client.
| Usage | Supported variables |
|---|---|
{{ variable }} | currentUser, currentQueue |
Example
"filterBy": {
"$assigned": "{{ currentUser }}"
}
Dynamic variables
Dynamic variables are interpolated at runtime.
| Usage | Supported variables |
|---|---|
${ variable } | applicant.key |
Example
"$qualfile": {
"label": "Qualfile",
"dataIndex": "properties['FisQualiFile.${ applicant.key }.accountAcceptanceTxt']",
"type": "text",
"link": {
"dataIndex": "properties['FisQualiFile.${ applicant.key }.htmlReport']",
"type": "html"
}
},
"dataIndex": "properties['FisQualiFile.${ applicant.key }.accountAcceptanceTxt']"
Helper functions
Helper functions are expressions that can be used within the JSON configuration to generate dynamic values.
date()
The date function is useful when a developer needs to define a date. Absolute and relative dates can be defined easily using natural language.
| Usage |
|---|
{{ date('natural language') }} |
Supported formats
Here is an inexhaustive list of supported formats.
- A specific day:
'today','Sunday, January 15th 2012','8/25/1978','8-25-1978','8.25.1978','2012-12-31','2016-Mar-18','June 3rd, 2005','1 Dec. 2016' - A relative day:
'in half a year','two weeks from today','the end of next week','four days after Monday','two days after tomorrow','March 15th of last year','next Tuesday','next week Thursday' - A specific day in a month or year:
'the 4th of July','the 15th','the end of February','the last day of February','the beginning of this month','the 2nd Tuesday of November','22 August','the first day of 2013' - A specific or relative week, month or year:
'next week','April 2012','5-2002','last year','five years ago' - A relative time:
'in 30 minutes','half an hour ago','an hour from now' - A specific or relative day and time:
'now','3pm Wednesday','yesterday at 4pm','6:30pm in three days','next Saturday at 10am' - A timestamp:
'17760523T024508+0830','1997-07-16T19:20:30+01:00','08-25-1978 11:42:32.488am','Wed, 03 Jul 2008 08:00:00 EST'
Example
"filterBy": {
"$stepAge": ["{{ date('1 week ago') }}", "{{ date('today') }}"]
},