The purpose of the expressions used in the message templates is to be able to adapt the subject or body of the message to the context. Thus, on the subject line of the received email, the addressee will immediately have information on the event.
The addressee can even open the subject referenced in CARL Source directly thanks to Hypertext links.
Attributes of entity as a message template setting
These attributes refer to the entity referenced in the message template.
The entity is not necessarily filled in for an indicator message; it is never filled in for an automatic job message.
Simple attributes of the entity
To display the attribute values of an entity, fill in the "Entity" field of the message template.
Next, add the attributes to the subject or body between braces.
The entities and their attributes can be viewed in the dictionary.
Example:
Complex attributes of the entity
You can also indirectly display the attribute values of subjects associated with the entity by writing the names of the hierarchical subjects followed by the attribute of the last subject, separated by periods.
You can thus cascade linked subjects.
Example 2:
These expressions are comparable to those used in defining indicators.
Status change details
All status change information available in the status history can be displayed. For this, the status code must be known (see Status workflow).
Example:
Element of a linked collection
You can also display details about a collection if you know the position of the element to be displayed, by putting it between square braces [].
Example:
Element of a values list
To retrieve the name of a valueList in a message template, add the following expression: {valueListDesc(<attribut> )}. The attribute can also be taken from another entity.
Examples:
Multi-time zone management
In an international context, it is possible to specify the time zone in which you wish to display a "Date" or "Date-time" in a message template.
It is now possible to use a time context conversion in dynamic expressions, via the @<temporal context> operator. This serves to convert a time value on the basis of a given time context. In other words, it serves, for example, to express a date-time in a different time zone.
The format is:
The following are examples of use in messages relating to Occupancy
The following are examples of use in messages relating to work orders
All time values in CARL Source have their own time context. Consequently, unless otherwise specified in the message template, the time values are displayed in their own context.
To display the identifier of a time zone (e.g. Europe/Paris) with a time value, a pattern must be used along with the symbolVV. Example: dd/MM/yyyy HH:mm:ss VV
This conversion can also be used when operations are performed on temporal data: e.g. addition, subtraction.
Examples:
When specifying a pattern in the date-time formats, the following symbols can be used (extract from ICU documentationhttp://userguide.icu-project.org/formatparse/datetime)
|
Table of symbols for formatting dates and times |
|||
|
Symbol |
Meaning |
Example(s) |
|
|
G |
era designator |
G, GG, or GGG |
AD |
|
y |
year |
yy |
96 |
|
Y |
year of "Week of Year" |
Y |
1997 |
|
u |
extended year |
u |
4601 |
|
U |
cyclic year name, as in Chinese lunar calendar |
U |
甲å |
|
r |
related Gregorian year |
r |
1996 |
|
Q |
quarter |
Q |
2 |
|
q |
Stand Alone quarter |
q |
2 |
|
M |
month in year |
M |
9 |
|
L |
Stand Alone month in year |
L |
9 |
|
w |
week of year |
w |
27 |
|
W\ |
week of month |
W |
2 |
|
d |
day in month |
d |
2 |
|
D |
day of year |
D |
189 |
|
F |
day of week in month |
F |
2 (2nd Wed in July) |
|
g |
modified julian day |
g |
2451334 |
|
E |
day of week |
E, EE, or EEE |
Tue |
|
e |
local day of week |
e or ee |
2 |
|
c |
Stand Alone local day of week |
c or cc |
2 |
|
a |
am/pm marker |
a |
pm |
|
h |
hour in am/pm (1~12) |
h |
7 |
|
H |
hour in day (0~23) |
H |
0 |
|
k |
hour in day (1~24) |
k |
24 |
|
K |
hour in am/pm (0~11) |
K |
0 |
|
m |
minute in hour |
m |
4 |
|
s |
second in minute |
s |
5 |
|
S |
fractional second - truncates (like other time fields) |
S |
2 |
|
A |
milliseconds in day |
A |
61201235 |
|
z |
Time Zone: specific non-location |
z, zz, or zzz |
PDT |
|
Z |
Time Zone: ISO8601 basic hms? / RFC 822 |
Z, ZZ, or ZZZ |
-0800 |
|
O |
Time Zone: short localized GMT |
O |
GMT-8 |
|
v |
Time Zone: generic non-location |
v |
PT |
|
V |
Time Zone: short time zone ID |
V |
uslax |
|
X |
Time Zone: ISO8601 basic hm?, with Z for 0 |
X |
-08, +0530, Z |
|
x |
Time Zone: ISO8601 basic hm?, without Z for 0 |
x |
-08, +0530 |
|
' |
escape for text |
' |
(nothing) |
|
' ' |
two single quotes produce one |
' ' |
' |
You can include a hypertext link to the detail sheet of the element in the body of the message.
To do this, simply put the text in the parentheses of the following expression: {detailLink()}.
You can also specify the identifier of the desired form if there are several forms (work order details and report, WR and WR to be taken into account).
This expression is also to be used if there is a custom form to apply.
In this case, enter: {detailLink(<attribute>,<Form identifier>, <Link name> )}.
Example 1:
Example 2:
Link to a related element
You can also include in the message body a hypertext link to the details of an attribute of the element.
For example, the WR Asset, the supplier of the order, etc.
To do this, simply indicate the attribute in parentheses followed by the name of the hypertext link: {detailLink(<attribute>,{name value})}.
Example:
Expressions specific to the message template for an indicator
If the message template is used for an indicator, you have special key words.
Message template for an automatic job
If the message template is used for an automatic job, you can have the automatic job attributes appear as if it were the referenced entity.
Example: