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]]teamid[[kv.v.user.app_name]]user's current application name[[kv.v.api.version]]version[[app_name]][[apimethod]]- GET/POST[[apipath]]- example{{host}}/api/srs/xtet?param=param[[userpermission]]- comma-separated list of permissions[[basepath]]- 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[[user_agent]]- user agent[[ismobile]]- detect if request is from mobile Android|webOS|iPhone|iPad|iPod|okhttp|BlackBerry|IEMobile|Opera Mini[[tenant]]- hosting_tenant from 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 SRS
srs/descriptionDescription- param
srs/def/itm[@model='param']value; an unresolved variable equals null
- options
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 setting lg-true, lg-false, sm-true, sm-false)srs/def/itm[@model='column']/@css
- commands (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 visiblity by setting lg-true, lg-false, sm-true,sm-false,active-true,active-false)srs/def/itm[@model='command']/@css