Skip to content

Commit 8a47f1b

Browse files
[ENV] expression token
1 parent 86ab5b0 commit 8a47f1b

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

docs/docs/core/expressions.md

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,37 @@ Here is a summary of available preprocessed tags that can be used in expressions
2626
> **Note**: The comprehensive descriptions below (and the [JavaDoc](https://platform.simplicite.io/current/javadoc/)) contains additional information.
2727
2828
| [Grant level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/GrantCore.html#prepareExpression-java.lang.String-java.lang.String-boolean-boolean-) | [Object level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/ObjectCore.html#prepareExpression-java.lang.String-java.lang.String:A-boolean-boolean-) | [External object level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/ExternalObject.html#prepareExpression-java.lang.String-) |
29-
|:-----------------:|:-------------------------------------------------:|:-------------------------:|
30-
| | All of Grant + following: | All of Grant + following: |
31-
| `[APPNAME]` | `[CONTEXT:context]` | `[OBJECTID]` |
32-
| `[ENCODING]` | `[OBJECTID]` | `[OBJECT]` |
33-
| `[GRANT]` | `[OBJECT]` | `[OBJNAME]` |
34-
| `[LOGIN]` | `[TABLE]` | `[OBJLABEL]` |
35-
| `[USERID]` | `[OBJNAME]` | `[PARAM:parameter name]` |
36-
| `[LANG]` | `[OBJLABEL]` | |
37-
| `[HASRESP:group]` | `[OBJINST]` | |
38-
| `[TEXT:code]` | `[PARENT]` | |
39-
| `[SYSPARAM:name]` | `[PARENTNAME]` | |
40-
| | `[PARENTLABEL]` | |
41-
| | `[PARENTINST]` | |
42-
| | `[CHILDOF:parent object name[:parent ref field]]` | |
43-
| | `[PANELOF:parent object name[:parent ref field]]` | |
44-
| | `[REFFROM:object name[:ref field]]` | |
45-
| | `[DATAMAPFROM:object name]` | |
46-
| | `[STATUS]` | |
47-
| | `[OLDSTATUS]` | |
48-
| | `[STATUSCHANGED]` | |
49-
| | `[ISNEW]` | |
50-
| | `[ISCOPIED]` | |
51-
| | `[ROWID]` | |
52-
| | `[FIELD:name]` | |
53-
| | `[COLUMN:input name]` | |
54-
| | `[LABEL:input name]` | |
55-
| | `[VALUE:input name]` | |
56-
| | `[OLDVALUE:input name]` | |
57-
| | `[DISPLAYVALUE:input name]` | |
58-
| | `[DISPLAYOLDVALUE:input name]` | |
59-
| | `[PARAM:parameter name]` | |
29+
|:----------------------:|:-------------------------------------------------:|:-------------------------:|
30+
| | All of Grant + following: | All of Grant + following: |
31+
| `[APPNAME]` | `[CONTEXT:context]` | `[OBJECTID]` |
32+
| `[ENCODING]` | `[OBJECTID]` | `[OBJECT]` |
33+
| `[GRANT]` | `[OBJECT]` | `[OBJNAME]` |
34+
| `[LOGIN]` | `[TABLE]` | `[OBJLABEL]` |
35+
| `[USERID]` | `[OBJNAME]` | `[PARAM:parameter name]` |
36+
| `[LANG]` | `[OBJLABEL]` | |
37+
| `[HASRESP:group]` | `[OBJINST]` | |
38+
| `[TEXT:code]` | `[PARENT]` | |
39+
| `[SYSPARAM:name]` | `[PARENTNAME]` | |
40+
| `[VERSION[:<module>]]` | `[PARENTLABEL]` | |
41+
| `[ENV:<env var name>]` | `[PARENTINST]` | |
42+
| | `[CHILDOF:parent object name[:parent ref field]]` | |
43+
| | `[PANELOF:parent object name[:parent ref field]]` | |
44+
| | `[REFFROM:object name[:ref field]]` | |
45+
| | `[DATAMAPFROM:object name]` | |
46+
| | `[STATUS]` | |
47+
| | `[OLDSTATUS]` | |
48+
| | `[STATUSCHANGED]` | |
49+
| | `[ISNEW]` | |
50+
| | `[ISCOPIED]` | |
51+
| | `[ROWID]` | |
52+
| | `[FIELD:name]` | |
53+
| | `[COLUMN:input name]` | |
54+
| | `[LABEL:input name]` | |
55+
| | `[VALUE:input name]` | |
56+
| | `[OLDVALUE:input name]` | |
57+
| | `[DISPLAYVALUE:input name]` | |
58+
| | `[DISPLAYOLDVALUE:input name]` | |
59+
| | `[PARAM:parameter name]` | |
6060

6161
Description
6262
-----------
@@ -99,6 +99,8 @@ _ `[EXTOBJECTURL:<external object name>[:<optional URL parameters>]]` : External
9999
- `[HASRESP:<group>]` or `[HASRESPONSIBILITY:<group>]`: check if user has specified responsibility
100100
- `[TEXT:<code>]`: value of a static text
101101
- `[SYSPARAM:<name>]`: value of a system parameter (without surrounding quotes because a system parameter can be numeric)
102+
- `[VERSION[:<module>]]`: value of the version of a specified module or value of the `VERSION` system parameter if no module specified
103+
- `[ENV:<environment variable name>[:<default value>]]`: value of the specified environment variable or the specified default value if the environment variable is not set
102104
- `[APPLICATION]` or `[APPNAME]`: the application name
103105
- `[ENCODING]`: the application encoding
104106
- `[NOW]` (deprecated) or `[DATE`[:day offset]`]`: current date in service format yyyy-MM-dd (with optional day offset)

docs/versions/release-notes/v5-3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,3 +972,4 @@ Post-release
972972
- Backported fix on crosstab chart when grouping date per day (`dateGroup='D'`) and field is a datetime
973973
- Backported [from v6.3](v6-3#new-helper-methods) new `getText` helper methods on `PDFTool` to extract raw text content of a PDF document
974974
- Backported fix workflow to re-eval data expressions in case of backward/forward
975+
- Backported [from v6.3](v6-3#new-configuration-items) `[ENV:<environment variable name>]` token in expressions

docs/versions/release-notes/v6-1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,3 +483,4 @@ Post-release
483483
- Backported [from v6.3](v6-3#improvements-of-the-generic-openidconnect-provider) improvements of the generic OpenIDConnect provider
484484
- Backported [from v6.3](v6-3#new-helper-methods) new `getText` helper methods on `PDFTool` to extract raw text content of a PDF document
485485
- Backported fix workflow to re-eval data expressions in case of backward/forward
486+
- Backported [from v6.3](v6-3#new-configuration-items) `[ENV:<environment variable name>]` token in expressions

docs/versions/release-notes/v6-2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,3 +439,4 @@ Post-release
439439
- `$ui.previewDocument` of image will have same rendering as Image field
440440
- Fixed form with 0,1 inlined object containing embedded 0,n panels
441441
- Fixed menu with only 1 domain and 1 object
442+
- Backported [from v6.3](v6-3#new-configuration-items) `[ENV:<environment variable name>]` token in expressions

docs/versions/release-notes/v6-3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ The `nonce` string used by the protocol has also been increased with some additi
272272

273273
### New configuration items
274274

275-
- Added `[ROOT]` and `[URL]` tokens in expressions
275+
- Added `[ROOT]`, `[URL]` and `[ENV:<environment variable name>[:<default value>]]` tokens in expressions
276276

277277
### New helper methods
278278

0 commit comments

Comments
 (0)