Expressions

Summary

Here is a summary of available preprocessed tags that can be used in expressions.

Note: The comprehensive descriptions bellow (and the JavaDoc) contains additional information.

Grant level Object level External object level
All of Grant + following: All of Grant + following:
[APPNAME] [CONTEXT:context] [OBJECTID]
[ENCODING] [OBJECTID] [OBJECT]
[GRANT] [OBJECT] [OBJNAME]
[LOGIN] [TABLE] [OBJLABEL]
[USERID] [OBJNAME] [PARAM:parameter name]
[LANG] [OBJLABEL]
[HASRESP:group] [OBJINST]
[TEXT:code] [PARENT]
[SYSPARAM:name] [PARENTNAME]
[PARENTLABEL]
[PARENTINST]
[CHILDOF:parent object name[:parent ref field]]
[PANELOF:parent object name[:parent ref field]]
[REFFROM:object name[:ref field]]
[DATAMAPFROM:object name]
[STATUS]
[OLDSTATUS]
[STATUSCHANGED]
[ISNEW]
[ISCOPIED]
[ROWID]
[FIELD:name]
[COLUMN:input name]
[LABEL:input name]
[VALUE:input name]
[OLDVALUE:input name]
[DISPLAYVALUE:input name]
[DISPLAYOLDVALUE:input name]
[PARAM:parameter name]

Description

Configuration items' expressions (e.g. calculated fields, constraints, state transition expressions, etc.) are in fact fragments of script code.

The main difference is on the bindings namings, for instance for a business object the this you use in the script is available as obj in the expressions.

In addition there are some preprocessed tags that are substituted to their corresponding script code at runtime. For instance [VALUE:myField] is in fact substituted as obj.getFieldValue("myField"). Using substituted tags is therefore not mandatory, consider them as "shorthands" to have easy to read expressions.

Here is the list of available substituted tags that you can use in expressions:

UI URLs tags

Available tags:

Grant level

Available bindings:

Available tags:

Note: the UI URLs tags are also avilable at grant-level

Business object level

Available bindings:

Note: The grant level bindings are also available at business object level.

Available tags:

Note: The UI URLs and grant level tags are also available at business object level.

External object level

Available bindings:

Note: The grant level bindings are also available at business object level.

Available tags:

Note: The UI URLs and grant level tags are also available at business object level.

Advanced

It is possible to write complex expressions by using self calling functions such as:

(function() {
    var res = "";
    // Do some complex stuff with res
    return res;
})();