Skip to main content
Version: 2024 R1

Variables

The Variables editor (expression editor, dictionary) can be found in many places around Designer Studio. It contains references to various metadata in the system. The editor is used for constructing SQL queries, JavaScript, BPS action configuration, and in places where it is possible and beneficial to use dynamically generated values.

Variables are represented by colorful blocks that can be inserted into fields by dragging and dropping or double-clicking.
When the editor is in advanced mode, variables will appear as text in curly brackets – this is the form in which variables are stored in the database.

Basic mode Advanced mode Current user

Whenever a query/script/action is executed, their variables are substituted with corresponding system data (e.g. value of a chosen form field, current date and time, step in which the workflow instance currently resides etc.).

Tag

Types of variables

Variables in the editor are divided into categories, grouping those with a similar purpose together. These groups are assembled dynamically, based on the context in which the editor is launched (i.e. opening the editor in different places in Designer Studio will result in different pools of available variables).

System fields – includes variables related to the current workflow instance in the context of which the expression is interpreted. Variables that describe workflow instances include:

  • Basic information about the instance, e.g. instance number, author details, comments.
  • Name and ID of the step, workflow, form type, and process to which the instance belongs.
  • Instance status (specifying whether the workflow instance is currently active).
  • Information about users assigned to the instance and business entities (companies) related to it.  
    Form fields – this group contains all form fields defined within the process. Certain form field types have additional options:
  • Choice fields – reference a choice field’s ID, name, or both in ID#Name format.
  • Date fields – choose a localized date format or extract only one component from the date (day, month or hour).
  • Floating-point fields – choose whether the referenced value will use a dot or comma as the decimal separator.
  • Person fields – choose between various information about a user, such as an email address, login or phone number, as well as the basic parameters of the user’s superior.

Context variables – obtain information about the currently logged in user, the current date, the document entry point from which an instance is modified, the default path that the instance can take, as well as information about the last path taken by the instance.

Objects' identifiers – contains IDs of all processes, the "WorkFlows", form types, steps, paths, and form fields defined in the process (main) database.

Instance number – contains references to components that make up an instance number, e.g. auto-numbering in different time periods or within context of individual the "WorkFlows" and form types.

Email template – consists of elements that can be added to the sent message template.

Operations – only applies to calculated floating-point columns on Item lists. Contains a list of available operators and fields from the current Item list that can be used to build mathematical expressions and perform calculations.

List of standard variables

{ID} {name} {WFD_name } – value in the "WFElements" table column. If the field has "NULL" value, empty text is returned.
{DTYPE_name} – value in the "WFDocTypes" table column for the form type. If the field has "NULL" value, empty text is returned.
{STP_name} – value in the "WFSteps" table column. If the field has "NULL" value, empty text is returned.
{DEF_name} – value in the "WFDefinitions" table column. If the field has "NULL" value, empty text is returned.
{WF_name} – value in the "WorkFlows" table column. If the field has "NULL" value, empty text is returned.

{I:ID} {I:name} {I:WFD_name} {I:DTYPE_name} {I:DEF_name} – value of the form field. If the field is a choice field containing "#" – it is the value before "#".
{N:ID} {N:name} {N:WFD_name} {N:DTYPE_name} {N:DEF_name} – value of the form field. If the field is a choice field containing "#" – it is the value after "#".
{U:ID} {U:name} {U:WFD_name} – address in the hyperlink field.
{S:ID} {S:name} {S:DET_name} – value in the "WFElementDetails" table column, available only in choice fields and pickers on item lists (not supported in choice tree mode).
{SI:ID} {SI:name} {SI:DET_name} – value in the "WFElementDetails" table column, available like above, but in case of choice fields returns the ID, namely the part before "#".
{SN:ID} {SN:name} {SN:DET_name} – value in the "WFElementDetails" table column, available like above, but in case of choice fields returns the displayed name, namely the part after "#".

{FD:ID} – numeric field value separated with a dot.
{FC:ID} – numeric field value separated with a comma.
{L:ID} – localizable field value – its value is set depending on the language of the browser.
{SFD:ID} – numerical value in a column from the "WFElementDetails" table separated with a dot.
{SFC:ID} – numerical value in a column from the "WFElementDetails" table separated with a comma.

{INV:ID} {INV:name} {INV:WFD_name} – date in the "WFElements" table, displayed in invariant culture.
{SINV:ID} {SINV:name} {SINV:WFD_name} – date in the "WFElementDetails" table, displayed in invariant culture.
{UTZ:ID} {UTZ:name} {UTZ:WFD_name} – date in the "WFElements" table, adjusted to the user’s time zone.
{SUTZ:ID} {SUTZ:name} {SUTZ:WFD_name} – date in the "WFElementDetails" table, adjusted to the user’s time zone.
{UTZL:ID} {UTZ:name} {UTZ:WFD_name} – date in the "WFElements" table, adjusted to the user’s time zone and displayed according to their culture.
{SUTZL:ID} {SUTZL:name} {SUTZL:WFD_name} – date in the WFElementDetails" table, adjusted to the user’s time zone, and displayed according to their culture.

{UTZDY:ID} {UTZDY:name} {UTZDY:WFD_name} – year extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{UTZDM:ID} {UTZDM:name} {UTZDM:WFD_name} – month number extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{UTZDD:ID} {UTZDD:name} {UTZDD:WFD_name} – day of the month extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{UTZDH:ID} {UTZDH:name} {UTZDH:WFD_name} – hour extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{UTZDMin:ID} {UTZDMin:name} {UTZDMin:WFD_name} – minute extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{UTZDSec:ID} {UTZDSec:nazme} {UTZDSec:WFD_name} – second extracted from the date in the "WFElements" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.

{SUTZDY:ID} {SUTZDY:name} {SUTZDY:WFD_name} – year extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{SUTZDM:ID} {SUTZDM:name} {SUTZDM:WFD_name} – month number extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{SUTZDD:ID} {SUTZDD:name} {SUTZDD:WFD_name} – day of the month extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{SUTZDH:ID} {SUTZDH:name} {SUTZDH:WFD_name} – hour extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{SUTZDMin:ID} {SUTZDMin:name} {SUTZDMin:WFD_name} – minute extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.
{SUTZDSec:ID} {SUTZDSec:name} {SUTZDSec:WFD_name} – second extracted from the date in the "WFElementDetails" table, adjusted to the user’s time zone. For form fields other than Date and time, it will return an empty value.

{SDY:ID} {SDY:name} {SDY:WFD_name} – year extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.
{SDM:ID} {SDM:name} {SDM:WFD_name} – month number extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.
{SDD:ID} {SDD:name} {SDD:WFD_name} – day of the month extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.
{SDH:ID} {SDH:name} {SDH:WFD_name} – hour extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.
{SDMin:ID} {SDMin:name} {SDMin:WFD_name} – minute extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.
{SDSec:ID} {SDSec:name} {SDSec:WFD_name} – second extracted from the date in the "WFElementDetails" table. For form fields other than Date and time, it will return an empty value.

{DY:ID} {DY:name} {DY:WFD_name} – year extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.
{DM:ID} {DM:name} {DM:WFD_name} – month number extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.
{DD:ID} {DD:name} {DD:WFD_name} – day of the month extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.
{DH:ID} {DH:name} {DH:WFD_name} – hour extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.
{DMin:ID} {DMin:name} {DMin:WFD_name} – minute extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.
{DSec:ID} {DSec:name} {DSec:WFD_name} – second extracted from the date in the "WFElements" table. For form fields other than Date and time, it will return an empty value.

{PM:ID} {PM:name} {PM:WFD_name} – the email address of a person in the "WFElements" table column. For fields other than Person or group it will return an empty value. {UMI:ID} {UMI:name} {UMI:WFD_name} – login of the superior of a person in the "WFElements" table column. For fields other than Person or group it will return an empty value. {UMN:ID} {UMN:name} {UMN:WFD_name} – display name of the superior of a person in the "WFElements" table column. For fields other than Person or group it will return an empty value. {UM:ID} {UM:name} {UM:WFD_name} – the superior of a person in the "WFElements" table column. For fields other than Person or group it will return an empty value. This value is returned in the following format: Login#Name.
{UMM:ID} {UMM:name} {UMM:WFD_name} – email address of the superior of a person in the "WFElements" table column. For fields other than Person or group it will return an empty value.

{ISMOBILE} – checks whether the form is being viewed on the mobile device. Returns "True" if it is a mobile device, otherwise it returns "False".

{R:name} – value of a parameter entered in the request. Request values are not supported in actions (Hyperlink action being an exception) and they are not supported in the generation of documents and printouts (HTML, .pdf, .docx).
{AD:name} – value of a parameter from user's profile in Active Directory. Parameters from Active Directory are supported wherever there are variables. The size of characters in the parameter name is not essential.
{MOSS:name} – value of a parameter from user's profile in MOSS. These parameters are available wherever variables are supported. The size of the letters in the parameter name is not important. If an attempt is made to use it on WSS, it will return an empty phrase.
{WSS:name} – value of a parameter from user's profile in the WSS user list. These parameters are available wherever variables are supported. The size of letters in the parameter name is not important.

info

The way {ID}, {name} and {WFD_name} suffixes in variables are handled depends on the location where the query is executed. By default, the entire content of the database field is returned. However, in several places they are formatted in the following way:

  • if the field is a DateTime, a shortened version of the date is returned (ToShortDateString()),
  • for fields that include "#", the text located after this character is returned (Name).

Actions in which this formatting applies:

The following variables support prefixes I: and N:, e.g. {I:CURRENTUSER}:

{CURRENTUSER} – current user’s login and displayed name (separated with "#").
{USERMANAGERFULL} – current user’s superior’s login and displayed name (separated with "#").
{USERMANAGEREMAIL} – current user's superior’s email address.
{USERPHONE} – current user's phone number.
{USERMOBILE} – current user's mobile phone number.
{USERMAIL} – current user's e-mail address.
{USERIP} – currently logged-in user's computer IP (downloaded from the request. If the request is unavailable, an empty value is returned).
{USERLAN} – currently logged-in user's language.
{WFDAKRONIM} – the acronym of the process. Outdated; use {DEF_Acronym} instead.
{WFDTYPEAKRONIM} – the acronym of a form type. Outdated; use {DTYPE_Acronym} instead.
{WFDIDD} – instance ID (not formatted in the extensionLabelFormat action).
{WFDUPDATEDBY} – login and name of the recent modifier.
{SIGNATURE1} – instance number, format 1.
{SIGNATURE2} – instance number, format 2.
{BARCODE1D} – returns a string of characters.
{BARCODE2D} – returns a string of characters.
{AUTOREMAIL} – workflow instance author’s email address.
{WFD_CreatedBy} – workflow instance author’s login and name.
{AUTHOR} – workflow instance author’s login (without information about domain).
{ASSIGNEDPERSONFULL} – logins and displayed names of users assigned to a workflow instance (login1#name1;login2#name2).
{ASSIGNEDPERSONDWFULL} – logins and displayed names of CC users (login1#name1;login2#name2).
{COM_ID} – ID of a business entity associated with the workflow instance.
{COM_CODE} – code of a business entity associated with the workflow instance.
{COM_NAME} – name of a business entity associated with the workflow instance.
{COM_DESCRIPTION} – description of a business entity associated with the workflow instance
{COM_FULLNAME1} – first line of the full name of a business entity associated with the workflow instance.
{COM_FULLNAME2} – second line of the full name of a business entity associated with the workflow instance.
{COM_ADDRES1} – first line of the address of a business entity associated with the workflow instance.
{COM_ADDRES2} – second line of the address of a business entity associated with the workflow instance.
{COM_ADDRES3} – third line of the address of a business entity associated with the workflow instance.
{COM_LOGOURL} – logo address of a business entity associated with the workflow instance.
{COM_NIP} – NIP (Tax Identification Number) of a business entity associated with the workflow instance.
{COM_PHONE} – phone number of a business entity associated with the workflow instance.
{DEFAULTPATH} – default path identifier.
{PROS} – downloads a registration point in ID# name format based on a person assigned to the registration point.
{PRIP} – downloads a registration point in ID# name format based on the IP or name of a computer defined in the registration point.
{CURRENT_PATH} – downloads current path in ID#name format. Available to use in an action’s SQL execution condition.

{DATECURRENT} – current date in yyyy-MM-dd format (with time in 00:00:00 format).
{LDATECURRENT} – current date in MM/dd/yyyy format (according to browser settings).
{ISODATECURRENT} – current date and time in yyyy-MM-ddTHH:mm (ISO) format.
{UTZDATECURRENT} – current date in yyyy-MM-dd (ISO) format.
{CURRENTDATE} – current date in yyyy-MM-dd (ISO) format.
{UTZCURRENTDATE} – current date in yyyy-MM-dd (ISO) format.
{CURRENTDATETIME} – current date and time in yyyy-MM-dd HH:mm format.
{UTZCURRENTDATETIME} – current date and time in yyyy-MM-dd HH:mm format.

Geopositioning

The user's geolocation data is available on path transition. Gaining access to this data requires prior configuration and setting options Location required.

{CURRENT_LOCATION} – information about the geographical longitude and latitude.
{CURRENT_LOCATION_LATITUDE} – information about geographical latitude only.
{CURRENT_LOCATION_LONGITUDE} – information about geographical longitude only.
{CURRENT_LOCATION_TRUSTED} – information indicating whether the precise location has been retrieved using the GPS device.

More information on configuring and using the above variables can be found in the chapter Geopositioning.

Outdated variables

{USERLOGIN}, {USERLOGINNAME} – current user's login; succeeded by: {I:CURRENTUSER}.
{USERNAME} – current user’s name; succeeded by: {N:CURRENTUSER}.
{USERMANAGER} – current user's superior’s login; succeeded by: {I:USERMANAGERFULL}.
{EAN} – HTML code with for bar code; succeeded by: {BARCODE1D}.
{EAN2} – HTML code with for 2D bar code; succeeded by: {BARCODE2D}.
{AUTOR} – workflow instance author’s login; succeeded by: {I:WFD_CreatedBy}.
{ASSIGNEDPERSON} – login of a person assigned to the workflow instance; succeeded by: {I:ASSIGNEDPERSONFULL}.
{ASSIGNEDPERSONNAME} – name of a person assigned to the workflow instance; succeeded by: {N:ASSIGNEDPERSONFULL}.
{ASSIGNEDPERSONDW} – login of a CC person assigned to the workflow instance; succeeded by: {I:ASSIGNEDPERSONDWFULL}.
{ASSIGNEDPERSONDWNAME} – name of a person assigned to the workflow instance; succeeded by: {N:ASSIGNEDPERSONDWFULL}.

caution

Outdated variables are still supported, but it is recommended to use their updated variants.

Special variables

Other variables used in the specific system locations:

Objects' identifiers

{PH:ID} – returns the ID of the transition path stated in it.
{DT:ID} – returns the ID of the form type stated in it.
{DF:ID} – returns the ID of the process stated in it.
{WF:ID} – returns the ID of the workflow stated in it.
{ST:ID} – returns the ID of the step stated in it.
{WFCON:ID} – returns the ID of the form field stated in it.
{COM:ID} – returns the ID of the business entity stated in it.
{DS:ID} – returns the ID of the data source stated in it.

Instance number definition

{NUMBER} – continuous numbering.
{NUMBER:number} – continuous numbering (completed to a length defined by an integer – max. 20).
{NUMBERINYEAR} – numbering in a current year.
{NUMBERINYEAR:number} – numbering in a current year (completed to a length defined by an integer – max. 20).
{NUMBERINMONTH} – monthly numbering in a current year.
{NUMBERINMONTH:number} – monthly numbering in a current year (completed to a length defined with an integer – max. 20).
{NUMBERINMONTHANDLOGIN} – monthly numbering in year and login.
{NUMBERINMONTHANDLOGIN:number} – monthly numbering in year and login (completed to a length defined by an integer – max. 20).
{NIY:ID} {NIY:name} {NIY:WFD_name} – numbering in a year from the entered field.
{NIY:ID: number} {NIY:name: number} {NIY:WFD_name:number} – numbering in a year from the entered field (completed to a length defined by an integer – max. 20).
{NIM:ID} {NIM:name} {NIM:WFD_name} – monthly numbering in a year from the entered field.
{NIM:ID: number} {NIM:name: number} {NIM:WFD_name: number} – monthly numbering in year from the entered field (completed to a length defined with an integer – max. 20).
{WFDID} – workflow instance ID, before this variable a numbering variable must be used (e.g. {NUMBER}).
{YEAR} – current year.
{MONTH} – current month.
{LOGIN} – user's login.
{DEF_ID} – process ID.
{DEF_Name} – process name.
{DEF_Acronym} – process acronym.
{DEF_Description} – process description.
{DTYPE_ID} – form type ID.
{DTYPE_Name} – form type name.
{DTYPE_Acronym} – form type ID.
{DTYPE_Description} – form type description.
{STP_ID} – step type ID.
{STP_Name} – step type name.
{STP_Description} – step description.
{WF_ID} – workflow ID.
{WF_Name} – workflow name.
{WF_Description} – workflow description.
{WFCOMMENT} – all comments on the workflow instance, formatted as "author (date): content;".
{WFLASTCOMMENT_AUTHOR} – author of the last comment.
{WFLASTCOMMENT_DATE} – date of the last comment.
{WFLASTCOMMENT_TEXT} – content of the last comment.

Action Print a barcode label

{WFD_ID} – workflow instance ID, expressed as a 10-digit number (e.g. 0000000012).
{name}, {WFD_name} – value in the "WFElements" table column : fields including "#" return the text after this character (Name), and Polish characters are removed from them.

Action: Send custom email

{EMAILLINKPATHS} – includes a set of links in the message body that function identically to transition paths. The number of links corresponds to the number of paths visible on the step.
{BTN:ID} – includes a link in the message body that functions identically to a transition path with the given ID.

Workflow control: Branch

{NEXTSTEP} – ID of the next step.
{PH:ID} – returns the ID of the transition path stated in it.

HTML and PDF print actions

Variables used to design HTML and PDF templates: HTML and PDF template creation.

Workflow instance status

{WSTSINPROGRESS} – in progress.
{WSTSPOSFINISHED} – finished, positive end-step.
{WSTSNEGFINISHED} – finished, negative end-step.