Server-side variables
Many server-side variables are available in text nodes.
Processing order:
- System variables are set from the request.
srssetupruns. Its parameters can already use system variables.- Every column of the first
srssetuprow becomes a user variable. - Variables are replaced in parameters, description, columns, options and commands.
System variables
kv.v.* variables are set only for authenticated users.
[[kv.v.user.username]]- username[[kv.v.user.userid]]- user ID[[kv.v.user.currency]]- currency[[kv.v.user.teamid]]- team ID[[kv.v.user.app_name]]- user's current application name[[kv.v.api.version]]- API version[[app_name]]- application name[[apimethod]]- GET/POST[[apipath]]- for example{{host}}/api/srs/xtet?param=param[[userpermission]]- comma-separated list of permissions[[basepath]]- for examplehttp://test.com[[srs_name]]- SRS name[[srs_id]]- SRS ID[[session_id]]- SQL Server UUID, database-friendly[[ipv4]]- IPv4 address[[trace_identifier]]- trace correlation identifier[[user_agent]]- user agent[[ismobile]]- detects whether the request comes from a mobile device (Android, webOS, iPhone, iPad, iPod, okhttp, BlackBerry, IEMobile, Opera Mini)[[tenant]]-hosting_tenantfrom settings
User variables (defined in srssetup)
Example:
| XML | |
|---|---|
[[currentdate]]- current date
A srssetup column must not have the same name as a system variable, and two srssetup commands must not return the same column name.
SRS and variables
Server-side and user variables can be used in the SRS:
srs/description- description- param
srs/def/itm[@model='param']- value; an unresolved variable equals null
- option
srs/def/itm[@model='option']- value
- column (an unresolved variable is replaced with an empty string)
srs/def/itm[@model='column']- valuesrs/def/itm[@model='column']/@labelsrs/def/itm[@model='column']/@opts(also visibility, by settinglg-true,lg-false,sm-true,sm-false)srs/def/itm[@model='column']/@css
- command (an unresolved variable is replaced with an empty string)
srs/def/itm[@model='command']/@labelsrs/def/itm[@model='command']/@typesrs/def/itm[@model='command']/@opts(also visibility, by settinglg-true,lg-false,sm-true,sm-false,active-true,active-false)srs/def/itm[@model='command']/@css