Skip to main content
Mitratech Success Center

System Variable Parameters

System variables will often contain Optional Parameters or other variables which control the data the system variable will return.

These are specified in SysVar tags using the following syntax:

{VARNAME, format=format_type}

VARNAME is the name of the system variable, and format type is the formatting option. format type can be one of any set of the following, depending on the system variable it’s in.

System variable parameters are not case sensitive.

When Process Director sees a string with text enclosed in curly braces, it will attempt to interpret the enclosed text as a system variable. To prevent it from doing so, add two backslashes before each curly bracket. For example, the string “\\{CURR_DATE\\}” will display the text “{CURR_DATE}”, and will not be replaced with the current date.

System variables for form fields use the locale specified in the form definition when formatting the string. For example, a form field defined as a currency field, and whose locale is specified in the form definition as "Japan", will render its value as Japanese Yen.

When used in a condition, system variables referring to running Workflow Steps or Process Timeline Activities (e.g., {ACTIVITY_RUN_TIME}), when used without specifying the name of a specific step/activity, will default to the "current" activity. However, if multiple activities are running, the result can be hard to predict. Process Director will now first look at the context in which the condition is being evaluated: for example, if the condition controls visibility on a form, and that form is being viewed in the context of a task, the "current" activity will always be that task.

Group Parameter

Most system variables can be configured via the “group” parameter, which limits the results of a system variable such that it will return only results belonging to the specified group. Use the following syntax to add a group restriction to a SysVar tag:

{SYSTEM_VARIABLE, group=group name}

Encode Types

Encoding types are special characters put inside system variable tags to force the tag to return a certain type. These are often used to prevent improperly encoded values from breaking a query. The format used to specify an encode type is as follows:

{encode-typeSysVar}

Where encode-type can be any one of the following symbols:

SYMBOL

DESCRIPTION

!

Encodes the result as HTML

$

Ensures the result is a valid SQL string

*

Converts the result into a valid SQL list of strings (e.g. ‘string one’, ‘string two’, ‘string three’)

#

Ensures the result is a valid SQL number

&

Converts the result to a URL encoded value

@

Ensures the result is valid for a calculation control or system variable tag

+

Ensures the result is a valid SQL Server date

-

Ensures the result is a valid Oracle date

^

Returns an LDAP encoded string which can be passed to an LDAP filter

~ Ensures the result is a valid string when used in LIKE comparisons in a WHERE clause
>

Ensures the result will render the string into a Windows filename-friendly format. E.g., if {FORM:fname} yields "a$b", then {>FORM:fname} yields "a_b".

Examples

SELECT * FROM MyTable WHERE col1 = '{$:text1}'

The $ encode will safely type the value of "text1" from:

Bob's Place

To:

Bob''s Place.

SELECT * FROM MyTable WHERE col1 LIKE ‘%{~:text1}%’ ESCAPE '\'

When used in in a LIKE statement, the ~ encode type will perform the same safe encoding as the $ does. Additionally, when adding the ESCAPE clause to the SQL statement, values that require escapes for special characters will be added to the encoding. So, for a value of:

100%

The combination of the ~ encode and the ESCAPE clause in the example will produce an encoded value of:

100/%

Pre, Post, and Null

Pre, post, and null are options specifying what text a system variable will display before the result, after the result, and if there is no result, respectively. Pre and post will display when the system variable result is not null, and the null text will display otherwise. To specify a system variable’s pre, post, and null values in the System Variable eForm control, use the SysVar tab.

image

To specify the Pre, Post, and Null values in a SysVar tag, use the following format:

{VARNAME pre=pre_text, post=post_text, null=null_text}

Pattern, Replace, and Trim

Pattern and Replace are parameters that can be added to any system variable. Data in the result of a system variable matching a regular expression specified in the Pattern parameter will be replaced as specified in the Replace Parameter. See Microsoft’s documentation on regular expressions in .NET for more information regarding regular expressions. The Trim parameter can also be added to any system variable. When set to 1, it will trim leading and trailing spaces off the result of the system variable.

Examples:

This Control Tag will replace the text “some text” in a form field with the text “other text”:

{:someFormField, Pattern=”some text”, Replace=”other text”, Trim=1}

This System Variable tag will remove any semicolons from the current user’s name:

{CURR_USER, Pattern=;, Replace=}

Instance= Modifier

Some System Variables return information about Timeline activities or Workflow steps. These activities and steps may be run several times over the course of a process. Using the “instance” parameter, you can specify which instance or instances of the activity you are referring to.

To get a total for all instances, set the instance parameter to “all”. This will add up the results of the System Variable for every time the activity or step has run within a Timeline or Workflow instance, and return that.

To get the value for the most recent instance, set the instance parameter to 0. To get the value for the second most recent instance, set the instance parameter to -1. To get the value for the third most recent instance, set the instance parameter to -3, and so on.

To get the value for the first instance of the step or activity in the Workflow or Timeline instance, set the instance parameter to 1. To get the value for the second instance of the step or activity, set the instance parameter to 2, and so on.

Examples:

{ACTIVITY_RUN_TIME:someActivity, instance=all}

This system variable will return the total time the activity has run in the Timeline instance.

{ACTIVITY_RUN_TIME:someActivity, instance=0}

This system variable will return the time it took the most recent instance of the activity to run in the Timeline instance.

{ACTIVITY_RUN_TIME:someActivity, instance=-2}

This system variable will return the time it took for the third most recent instance of the activity to run.

{ACTIVITY_RUN_TIME:someActivity, instance=1}

This system variable will return the time it took for the first instance of the activity to run in the Timeline instance.

Comma-Separated List (CSV) Strings

Any time a system variable returns a comma-separated list of values, you can use the modifier format=distinct to remove any duplicate values from the list.

Form Fields

A number of general formatting and value options apply to eForm Field values.

FORMAT:

{FORM:someFieldName, format=Currency}

  • Currency: Formats the system variable into a format representing currency (e.g. $22.99)
  • Number: Ensures that a system variable returns an integer
  • Value: Returns the value of a dropdown selection
  • String: Returns the text in a form field, or the displayed text of a dropdown selection
  • Friendly: Returns the friendly field name
  • ClientID: Returns HTML ID of the control suitable for JavaScript
  • DisplayString: Returns the displayed text of a dropdown selection

ROW_NUM:

{FORM:someFieldName, ROW_NUM=2}

  • If this form control is part of an array, returns the value specified by the ROW_NUM parameter

SEPARATOR:

{FORM:someColumnFieldName, SEPARATOR=|}

  • If this form control is part of an array, this option specifies which character will be used to separate the different values in the different elements of the array. By default, the separator is a comma.

Numerical System Variables

System variables that return numbers will have the following options:

Format

{FORM:someFieldName, format=FormatType}

  • Currency: Formats the system variable into a format representing currency (e.g. $22.99).
  • Number: Ensures that a system variable returns an integer.

Digits

{FORM:someFieldName, digits=Number}

Adding the formatter digits=n, where "n" is the number of digits, will return the number formatted as an n- digit number. This parameter will PAD the form field value with 0's, and it will not truncate. Example usage: A numeric form field using the parameter {FORM:fieldname, digits=3} and that contains the value "23" will return "023".

DateTime System Variables

System variables that return a datetime will have the following options:

  • YEARS: adds a specified number of years to a DateTime or TimeSpan SysVar result.
  • MONTHS: adds a specified number of months to a DateTime or TimeSpan SysVar result.
  • DAYS: adds a specified number of days to a DateTime or TimeSpan SysVar result.
  • HOURS: adds a specified number of hours to a DateTime or TimeSpan SysVar result.
  • MINUTES: adds a specified number of minutes to a DateTime or TimeSpan SysVar result.
  • SECONDS: adds a specified number of seconds to a DateTime or TimeSpan SysVar result.
  • BUSINESS DAYS: adds a specified number of business days to a DateTime or TimeSpan SysVar result, using the syntax BUSINESS_DAYS.
  • BUSINESS HOURS: adds a specified number of days to a DateTime or TimeSpan SysVar result, using the syntax BUSINESS_HOURS.By default, business hours are from 8:00am to 6:00pm, but business hours can be configured in the vars.cs file via the BusinessHourStart and BusinessHourEnd variables.
  • FULLYEARS: Adds the number of full, 365-day years for a DateTime or Timestamp SysVar result.
  • FULLMONTHS: Adds the number of full, 30.414-day months for a DateTime or Timestamp SysVar result.
  • FULLDAYS: Adds the number of full, 24-hour days for a DateTime or Timestamp SysVar result.
  • INCLUDE END DATE: When using the IncludeEndDate= parameter, the value can be true or false. The default is false. If this value is set to true, the system will include the "end date" in the date diff calculation. This will take into account the "business days" parameter and only include the end date if it falls on a business day. Timespan system variables represent an elapsed amount of time, whereas datetime system variables refer to a specific point in time.
  • OR NEAREST BUSINESS DAY: This option instructs all date system variables to return the evaluated date if that date is a business day, and otherwise to return the previous or next business day, as directed. The time portion of the date value is unaffected, only the date portion is (potentially) modified. The syntax is {DATETIME_VARIABLE, OrNearestBusinessDay=Prev|Next}.

The Types YEARS, MONTHS, DAYS, HOURS, and MINUTES use "calendar" elapsed times, which is to say that , if a time span crosses a calendar date, it counts as a full increment of the selected calendar Type (Day, Month, etc.). For example, a time span from 11:59 PM on Dec 31 to 12:01 AM on Jan 1 is only a two- minute time span, but it will be counted as 1 day in DAYS, 1 month in MONTHS, or 1 year in YEARS. Any time span which crosses a date will be counted as a full increment of the Type chosen.

The Types FULLDAYS, FULLMONTHS, and FULLYEARS compare the time span to a pre-defined length of time. FULLDAYS returns 1 for every actual 24 hours elapsed, FULLMONTHS returns 1 for every 30.416 days, and FULLYEARS returns 1 for every 365 days. Using these types, the time span from 11:59 PM on Dec 31 to 12:01 AM on Jan 1 would return 0 for all three types.

FORMAT

Datetime system variables also have a format parameter that can be used to determine how the date and time are displayed. The format parameter can be set to any combination of the following options:

{CURR_DATE, format=option, years=numberOfYears, months=numerOfMonths … }

  • d: displays the current day of the month as a number (1 – 31)
  • dd: displays the current day of the month as a number, padding to two digits with a zero if necessary (01– 31)
  • ddd: displays the abbreviated name of the day (Sun. – Sat.)
  • dddd: displays the full name of the day (Sunday – Saturday)
  • h: displays the hour as 1-12. Without specifying AM or PM, 1:00pm is indistinguishable from 1:00am (and so on) with this formatting option.
  • hh: displays the hour as 01-12. Padding using a zero is applied to ensure that the value returned is two characters long. Without specifying AM or PM, 1:00pm is indistinguishable from 1:00am (and so on) with this formatting option.
  • H: displays the hour as 0-23.
  • HH: displays the hour as 00-23. Padding using a zero is applied to ensure that the value returned is always two characters long.
  • m: displays the current minute as a number 0 – 59
  • mm: displays the current minute as a number 00 – 59. Left padding using a zero is added to ensure the return value is two characters long
  • M: displays the month as a number 1 – 12
  • MM: displays the month as a number 01 – 12. Left padding using a zero is added to ensure the return value is two characters long.
  • MMM: returns the abbreviated name for the month (Jan. – Dec.)
  • MMMM: returns the full name for the month (January – December)
  • s: displays the seconds as a number 0 – 59
  • ss: displays the seconds as a number 00 – 59. Padding using a zero is added to the left of the return value to ensure it is two characters long.
  • t: displays an A if the time is before noon or P if it is after noon
  • tt: displays A.M. if the time is before noon. Otherwise displays P.M.
  • y: displays the year as a one or two digit number. The first two numbers of the year are always omitted. The third digit of the year is omitted if the year is between ’00 and ’09 (e.g. 1, 17, 93)
  • yy: displays the last two digits of the year. (e.g. 48, 67, 73)
  • yyyy: displays all four digits of the year. If the year is less than four digits long, zeros are added to pad the year value to four digits (e.g. 1982, 2009)
  • separators (/ : “ ‘): quotation marks, apostrophes, colons, and slashes can be added to the datetime formatting. They will displayed literally, and can be used to separate different elements of the datetime string.
  • AUTO: This option is valid for TimeSpan values only, and will format the result into the nearest logical unit of time for human consumption. The result will include a number as well as a unit of time. For example, a TimeSpan of 25 hours would evaluate to “1 day”, while a period of 2 hours would evaluate to “2 hours”.

Timespan System Variables

Timespan system variables return amounts of elapsed time. They are distinct from datetime system variables in that they do not return specific points in time, but amounts of time.

Format

You can specify the format of timespan system variables using the Format= option. The Format= option determines how the timespan is displayed in text. The string specifying the format of a timespan can have any text, and should also include at least one of the following options:

  • [d]: the days portion of the timespan
  • [D]: the duration of the timespan expressed in days, padded to two decimal places
  • [h]: the hours portion of the timespan
  • [H]: the duration of the timespan expressed in hours
  • [m]: the minutes portion of the timespan
  • [M]: the duration of the timespan expressed in minutes
  • [s]: the seconds portion of the timespan
  • [S]: the duration of the timespan expressed in seconds

Each of these options can be modified to pad the variable to two or three characters in length, by changing the format string from [x] to [xx] or [xxx] respectively. For example, to pad the seconds portion of the timespan to three characters in length, you would use the format string [sss], and to pad the duration of the timespan in days to two characters in length, you could use the format string [DD].

Business Rule System Variables

Business rules that you create are added to the System Variables dropdown menu so that the Business Rules can be accessed in any place where system variables are used.

Business Rules

image

Returns - This system variable returns the result of a selected Business Rule.

SysVar Tag - {RULE:business rule name}

Optional Parameters - The result of this system variable can be formatted according to the options available to the type of data the business rule returns.

A rule can be formatted as a currency using the format=currency parameter.

DateTime System Variables

System variables that return a Datetime value will have the universal formatting options specified in the Datetime section of the System Variable parameters topic. System variables that return a Timespan value will have the universal formatting options specified in the Timespan section of the System Variable parameters topic.

Current Date

image

Returns - This system variable returns the date at the moment this system variable is being referenced.

SysVar Tag

{CURR_DATE, days=30}

{CURR_DATETIME} (for the time as well)

{CURR_TIME} (for just the time)

{CURR_YEAR| CURR_MONTH| CURR_WEEK| CURR_DAYOFYEAR| CURR_DAY| CURR_DAYOFWEEK | CURR_HOUR| CURR_MINUTE} (for just that component)

Optional Parameters - This system variable can be formatted according to the options available to datetime system variables.

Date

Returns - This option allows the user to specify a datetime from a datetime picker. While not technically a system variable, information about a date can be gathered via SysVar tags by referencing a date picker.

SysVar Tag - {FORM:someDateTimePicker}

Optional Parameters - The result of this form field SysVar tag can be formatted according to the options available for form field SysVar tags.

Date Difference

Returns - This system variable returns the difference between two datetimes.

SysVar Tag - {DATEDIFF, DATE1={someDate}, DATE2={someOtherDate}, TYPE=YEARS|MONTHS|DAYS|HOURS|MINUTES|SECONDS|BUSINESS_DAYS|BUSINESS_HOURS

|FULLDAYS|FULLMONTHS|FULLYEARS, INCLUDEENDDATE=true|false}

Optional Parameters - Using the "Type=" parameter, this system variable can return the difference in years, months, days, minutes, seconds business days, or business hours.

When using the "IncludeEndDate= " parameter, the value can be true or false. The default is false. If this value is set to true, the system will include the "end date" in the date diff calculation. This will take into account the "business days" parameter and only include the end date if it falls on a business day.

Days Ago

image

Returns - This system variable returns a date a specific number of days before the date that this system variable is referenced.

SysVar Tag - {CURR_DATE, days=-number of days ago}

Optional Parameters - This system variable can be formatted according to the options available to datetime system variables.

Days From Now

image

Returns - This system variable returns a date a specific number of days after the date that this system variable is referenced.

SysVar Tag - {CURR_DATE, days=number of days from now}

Optional Parameters - This system variable can be formatted as a datetime system variable.

Is Business Day

Returns - This system variable returns True if the evaluated date is a business day. The default date the variable evaluates is the current date.

SysVar Tag:

{IS_BUSINESS_DAY}

{IS_BUSINESS_DAY:DateTimeValue}

{IS_BUSINESS_DAY}, Date=DateTimeValue

Optional Parameters

Date: A Datetime value other than the current date, which you wish to be evaluated. Omitting this variable will cause the variable to evaluate the current DateTime.

Is Business Hour

Returns - This system variable returns True if the evaluated DateTime value falls within business hours. Since this variable only evaluates times, you must first use the IS_BUSINESS_DAY variable to determine if the date is a business day, prior to using this variable to determine whether the time falls within business hours. So, for a given datetime value, both IS_BUSINESS_DAYS and IS_BUSINESS_HOURS must return true to determine that the DateTime value actually occurs during business hours.

SysVar Tag:

{IS_BUSINESS_HOUR}

{IS_BUSINESS_HOUR:DateTimeValue}

{IS_BUSINESS_HOUR, Date=DateTimeValue}

Optional Parameters

Date: A Datetime value other than the current date, which you wish to be evaluated. Omitting this variable will cause the variable to evaluate the current DateTime.

Is Business Date

Returns - This system variable returns True if the evaluated DateTime value is a business date and time. Unlike IS_BUSINESS_DAY and IS_BUSINESS_HOUR, this variable evaluates both the date and time.

SysVar Tag:

{IS_BUSINESS_DATE}

{IS_BUSINESS_DATE:DateTimeValue}

{IS_BUSINESS_DATE, Date=DateTimeValue}

Optional Parameters

Date: A Datetime value other than the current date, which you wish to be evaluated. Omitting this variable will cause the variable to evaluate the current DateTime.

Email System Variables

Email Anonymous Task List URL

Returns - This system variable returns the URL to a task list that can be used to see the task list for an anonymous user, based on the user's email address. To use this variable, the option "Allow anonymous users to be assigned tasks by email address" has to be turned on in the Advanced Options of the Workflow Task or Process TImeline activity.

This variable requires a "kvid" parameter that identifies the Knowledge View ID of a Task List partition Knowledge View . No filter is needed on the Knowledge View to identify the user, as the variable will filter the Task List items to display only those that match the user's email address.

SysVar Tag - There are two methods to set the required KVID parameter in the variable.

Since you usually only need one Knowledge View in your Process Director Installation to generate the task list for anonymous user, there is a universal method to set the value of the KVID when you place the variable in an email template. Simply set the value as a Custom variable in the vars file as described in the Creating Your Own Custom Variables section of the Developer's Guide. The sample syntax for setting this variable might be:

bp.Vars["TaskListKV"] = "EA89390C-53B7-44DC-B6CB-12938EFBC236";

Once the custom variable has been set, it can be referenced in the "kvid" parameter as:

{EMAIL_ANON_TASKLIST_URL, kvid={CUSTOMVAR:TaskListKV}}

This is the recommended method for setting the KVID.

The second method for setting the KVID is simply to pass the KVID directly in the email template by using the syntax:

{EMAIL_ANON_TASKLIST_URL, kvid=ea89390c-53b7-44dc-b6cb-12938efbc236}

The drawbacks to this method are :

  • If the variable is widely used in different email templates, and you want to change the partition Knowledge View that displays the Task List, you will need to replace the old KVID with the new one in every email template where it is used.
  • Any time you import the email template from a development to a production system, you will need to manually edit the KVID, as the ID will be different on the production system.

Because of these drawbacks, this second method is not recommended.

Required Parameter

kvid: The Knowledge View ID of the partition Knowledge View that generates the task list for the anonymous user.

Email Complete Url

Returns - This system variable returns the URL of the page to automatically complete the task.

SysVar Tag:

{EMAIL_COMPLETE_URL}

Optional Parameters

Action: the name of the task to complete. If unspecified, the user will be given a dropdown of the tasks to complete.

Confirm: if set to 1, a web page will be shown prompting the user to confirm that he wants to complete the task.

Comments: if set to 1, a text box will appear allowing the user to enter comments

Email Completion Ok

Returns - This system variable returns a Boolean value that specifies whether a task can be completed via email.

SysVar Tag:

{EMAIL_COMPLETION_OK}

Optional Parameters - There are no optional parameters for this system variable.

Email External User

Returns - This system variable returns a Boolean value reflecting whether the user being emailed is an external user or not.

SysVar Tag:

{EMAIL_EXT_USER}

Optional Parameters - This system variable doesn’t have optional parameters.

Email Form Instance Url

Returns - This system variable returns the URL to the form instance or process activity that sent this email.

SysVar Tag:

{EMAIL_FORM_INSTANCE_URL}

Optional Parameters

CompletePage: the full URL of the page to navigate to after the task is completed.

CompletePagePrompt: set to 0 to prevent a confirmation prompt from displaying

CompleteText: text to display after the task is completed

NoHome: set to 1 to prevent the home page from displaying when the task link is clicked.

AddProcessID: adds the ID of the process sending this email to the email URL. This allows the link to associate the form instance with the process, such that the correct attachments, routing slip, etc. are displayed.

Email Invitation OK

Returns - This system variable returns a Boolean value that specifies whether a task can be forwarded to another user for assignment.

SysVar Tag:

{EMAIL_INVITATION_OK}

Optional Parameters - There are no optional parameters for this system variable.

Email Reminder Description

Returns - This variable returns the reason the email reminder has been generated, as configured in the dropdown value of the notification settings in the workflow step/timeline activity.

SysVar Tag:

{EMAIL_REMINDER_DESC}

Optional Parameters

There are no optional parameters for this system variable.

Email Result Links

Returns - This system variable returns a list of the URLs of the branches or activity results from the task that sent this email.

SysVar Tag:

{EMAIL_RESULT_LINKS}

Optional Parameters

Separator: specifies arbitrary HTML to separate each link. HTML tags must be enclosed in square brackets. For example, separator=”[br/]” would put a new line between each link.

Confirm: if set to 1, prompts a user to confirm that he wants to take this branch.

Comments: if set to 1, a text box appears allowing the user to enter comments.

Icon: determines if the link returned links to an icon (if set to 1) or the branch or activity result (if set to 0)

Email Result List

Returns - This variable returns a list of the potential branches or activity results from this task.

SysVar Tag:

{EMAIL_RESULT_LIST}

Optional Parameters

The user can specify a character to separate each result in the list.

Email Task Id

Returns - Replaced with a tag indicating the task list used to send this email.

SysVar Tag:

{EMAIL_TASK_ID}

Optional Parameters

There are no optional parameters for this system variable.

Email Url

Returns - This system variable returns the URL of the task the email links to. This system variable can be put in link HTML tags.

SysVar Tag:

{EMAIL_URL}

Optional Parameters

CompletePage: the full URL of the page to navigate to after the task is completed.

CompletePagePrompt: set to 0 to prevent a confirmation prompt from displaying

CompleteText: text to display after the task is completed

NoHome: set to 1 to prevent the home page from displaying when the task link is clicked.

Email User

Returns - This system variable returns the user the task is assigned to.

SysVar Tag:

{EMAIL_USER}

Optional Parameters

This system variable can be formatted as a user system variable.

image

Form System Variables

Converting To Pdf

Returns - This system variable returns a Boolean value reflecting whether or not the eForm is being converted to a PDF. Use this system variable to change is displayed on PDF versions of an eForm.

SysVar Tag:

{FORM_TO_PDF}

Optional Parameters

This system variable does not have Optional Parameters.

Form Attachment Group

Returns - This system variable returns the name of a group that an attached object is in.

SysVar Tag:

{FORM_ATTACHMENT_GROUP}

Optional Parameters

This system variable does not have Optional Parameters.

Form Attachments

Returns - This system variable returns a comma-separated list of object names attached to this form instance.

SysVar Tag - {FORM_ATTACHMENTS, ShowName=1, ShowDesc=0, ShowID=0, GroupName=group}

Optional Parameters

Groupname: Filters the results returned by group.

ShowName: The option is set to 1 by default. When set to 1, it will display the name of the attachment.

ShowDesc : The option is set to 0 by default. If set to 1, it will display the attachment’s description.

ShowID : The option is set to 0 by default. If set t 1, it will display the object’s internal ID.

If each is set to 1, each attachment will be returned in the format “name : description, name : description, name : description”…

The GroupName parameter limits the system variable such that it only returns a list of objects in the specified group.

Form Attachment Size

image

Returns - This system variable returns the cumulative size of all documents attached to the form.

SysVar Tag:

{FORM_ATTACHMENT_SIZE, groupname=}

Optional Parameters

groupname: The option can be used to have the system variable return the cumulative size of only the documents in the specified group.

Form Event Name

image

Returns - This system variable returns a string containing the name of the most recent form event.

SysVar Tag - {FORM_EVENT_NAME}

Optional Parameters

This system variable does not have Optional Parameters.

Form Event Type

image

Returns - This system variable returns a string reflecting the type of the most recent form event. The returned string can be any of the following values:

  • User
  • Complete
  • Cancel
  • Save
  • SaveAndClose
  • Print
  • CancelClose
  • DocumentAttached
  • ClipboardAttached
  • RefreshEvent

SysVar Tag - {FORM_EVENT_TYPE}

Optional Parameters

This system variable does not have Optional Parameters

Form Field

Image_011.jpg

Returns - A Form Field system variable will return the value of a specified form field. The data will be drawn from the active instance of the eForm. When the form field name is the name of a column in an array, this system variable will return a comma separated listed of the values of all the non-empty fields in that column. To include empty values in that list, set the optional parameter KeepEmptyRows to true.

SysVar Tag:

{FORM:form_field_name}

OR

{:form_field_name}

Optional Parameters

The Optional Parameters available depend on what kind of data the form field contains. If the form field contains arbitrary data, then the form field system variable Optional Parameters apply. If the form field contains data about a user, then the user system variable Optional Parameters apply. No Optional Parameters are available when the form field contains information about an object.

The general form field system variable options apply to all form fields.

When the form field name is the name of a column in an array, this system variable will return a comma separated listed of the values of all the non-empty fields in that column. To include empty values in that list, set the optional parameter KeepEmptyRows to true.

When the form field is a checkbox, you can use the formatters True='value' and False='value'. These formatters allow you to place any desired string in the 'value' to replace the default values of True and False with the desired strings.

When the form field has a numeric values, adding the formatter digits=n, where "n" is the number of digits, will return the number formatted as an n-digit number.

When the form field is a Comment Log control, adding the formatter format=COMMENTS will return the number of comments entered into the comment log.

Form Instance Id

Returns - This system variable returns the ID of the current form instance.

SysVar Tag

{FORM_INSTANCE_ID}

Optional Parameters

This system variable cannot be formatted.

Form Lock Date

image

Returns

This system variable returns the date and time the form was locked.

SysVar Tag - {FORM_LOCK_DATE}

Optional Parameters

This system variable is a datetime system variable and can be formatted accordingly.

Form Lock User

image

Returns - This system variable returns the user who locked a form.

SysVar Tag - {FORM_LOCK_USER}

Optional Parameters

This system variable is a user system variable and can be formatted accordingly.

Form Printing

image

Returns - This system variable returns a Boolean value reflecting whether or not the eForm is being printed. Use this to change what is displayed on printed versions of the eForm.

SysVar Tag - {FORM_PRINTING}

Optional Parameters

This system variable does not have Optional Parameters.

Form Submitter

image

Returns - This system variable returns information about the user that submitted the eForm, thus creating the eForm instance.

SysVar Tag - {FORM_SUBMITTER}

Optional Parameters

The Optional Parameters for a User system variable apply to this SysVar.

Is Form Locked?

image

Returns - This system variable returns a Boolean result that is true if another user has locked the form, preventing any other user from making changes to it. Form locking can be enabled with the “Enable Form Locking” setting on the form definition.

SysVar Tag - {IS_FORM_LOCKED}

Optional Parameters

This system variable does not have optional parameters.

Is On Mobile Device?

Image_017.jpg

Returns - This system variable returns a Boolean value reflecting whether or not the eForm is being displayed on a mobile device. Use this to change what an eForm displays depending on what device is displaying an eForm. Tablets count as mobile devices.

SysVar Tag - {FORM_IS_MOBILE}

Optional Parameters

This system variable does not have Optional Parameters.

New Form Instance

image

Returns - This system variable returns a Boolean value (e.g. yes/no, true/false) reflecting whether or not the eForm instance has just been created.

SysVar Tag - {NEW_FORM_INSTANCE}

Optional Parameters

No Optional Parameters apply to this system variable: it will always return a Boolean value.

Num Form Attachments

image

Returns - This system variable returns the number of attachments to an eForm instance.

SysVar Tag:

{FORM_ATTACHMENT_NUM, ObjectType=Document|Form CSStatus=Pending|NotPending|Failed|Done|PendingOrFailed, GroupName=group}

Optional Parameters

This system variable’s results can be restricted by object type using the ObjectType parameter. Acceptable values are DOCUMENT and FORM.

CSStatus: The option is available with Concept Share integration. When a value is specified, the system variable will return only the number of documents matching that stated. If “Failed” is selected, this system variable will return the number of documents that failed to upload to Concept Share.

GroupName: The option limits the system variable such that it only returns the number of attachments in the specified group.

Submit Date

image

Returns - The Submit Date system variable returns the date a form instance was submitted on.

SysVar Tag - {FORM_SUBMIT_DATE}

Optional Parameters

This system variable can be formatted according to options available to datetime system variables.

image

Meta Data System Variables

Attribute

Returns - This system variable returns the name of an attribute if the object containing this system variable is assigned to that attribute. If the object is not assigned to the attribute, the system variable will return a null string.

SysVar Tag - {ATTRIBUTE:category_name.attribute_name, format=currency|value|string}

Optional Parameters

This system variable can be formatted as a currency, a numeric value, or a string using the format= option.

Category

image

Returns - The Category system variable returns the name of a specified category or list of categories so long as the object containing this system variable is assigned to that category. If the object is not assigned to a listed category, the system variable returns a null string for that category.

SysVar Tag - {CATEGORY:category_name_1.category_name_2…}

Optional Parameters

This system variable does not have Optional Parameters.

Miscellaneous System Variables

Returns - This system variable returns the numerical result of a mathematical formula. Both constants and system variables can be used in the formula. A formula is described in traditional mathematical notation, e.g. “100 – 5” or “{someSystemVariable} * 2”.

SysVar Tag - {CALC, Formula=some formula, Format=formatString}

Optional Parameters

System variable results that can be formatted as numbers can be formatted with .NET format strings. Consult MSDN to see what standard format strings are available, and to see how you can create your own format using a custom format string.

Setting the format parameter to currency will format the result of this system variable as a currency.

Cookie

Returns - This system variable returns the cookie value of the named cookie.

SysVar Tag - {COOKIE, Name=cookie name}

Optional Parameters

This system variable does not have Optional Parameters.

Current User Groups

Returns - This system variable returns a comma-separated list of the groups the current user belongs to.

SysVar Tag - {CURR_USER_GROUPS, format=ID|String, ShowDelegate=true}

Optional Parameters

This system variable can be formatted as either an ID or String. ShowDelegate, when set to true, will show to whom the user is delegating.

Custom Variable

Returns - This system variable returns the value of a specified variable defined in the vars.cs.ascx file. Please see the Developer's Guide to learn how to configure the values of custom variables.

SysVar Tag - {CustomVar:someVariableName}

Optional Parameters

This system variable does not have optional parameters.

Debug_Mode

Returns - This system variable returns a Boolean (yes/no) value reflecting whether debug mode is current on or off.

SysVar Tag - {DEBUG_MODE}

Optional Parameters

This system variable does not have Optional Parameters.

Document Check In User

Returns - This system variable, usable only on documents, returns the last user who checked in the documents.

SysVar Tag - {DOC_CHECK_IN_USER}

Optional Parameters

This system variable can be formatting via standard User system variable formatting options.

Install Path

Returns - This system variable returns the file path to the root folder of the current instance of the Process Director installation.

SysVar Tag - {INSTALL_PATH}

Optional Parameters

This system variable does not have Optional Parameters.

Interface Url

Returns - This system variable returns the URL of the interface of the system configurations.

SysVar Tag - {INTERFACE_URL}

Optional Parameters

This system variable does not have Optional Parameters.

Is Business Hour

Returns - This system variable returns true if and only if the current hour is a business hour. By default, business hours are from 8:00am to 6:00pm, but business hours can be configured in the vars.cs file via the BusinessHourStart and BusinessHourEnd variables.

SysVar Tag - {IS_BUSINESS_HOUR}

Optional Parameters

This system variable does not have optional parameters.

Knowledge View Definition Name

Returns - This system variable returns the name of a knowledge view definition.

SysVar Tag - {KV_DEF_NAME}

Optional Parameters

This system variable does not have optional parameters.

Knowledge View Number Of Rows

Returns - This system variable returns the number of rows in a knowledge view instance.

SysVar Tag - {KV_NUM_ROWS}

Optional Parameters

This system variable does not have optional parameters.

Knowledge View Filter Data

Returns - This system variable returns a string representing the filters used in the knowledge view.

SysVar Tag - {KV_FILTER_DATA}

Optional Parameters

This system variable does not have optional parameters.

Logo Url

Returns - This system variable returns the URL of the system logo image.

SysVar Tag - {LOGO_URL}

Optional Parameters

There are no Optional Parameters for this system variable.

Num Kview Items

Returns - This system variable returns the number of results returned by a knowledge view with the specified name.

SysVar Tag - {NUM_KVIEW_ITEMS:kviewname}

Optional Parameters

This system variable does not have optional parameters.

Row Next

Returns - The Row Next system variable returns the number of the next row in an array.

SysVar Tag - {ROW_NEXT}

Optional Parameters

This system variable does not have Optional Parameters

Row Num

Returns - The Row Num system variable returns the number of the array row containing this system variable.

SysVar Tag - {ROW_NUM}

Optional Parameters

This system variable does not have Optional Parameters.

Row Prev

Returns - The Row Prev system variable returns the number of the previous row in an array.

SysVar Tag - {ROW_PREV}

Optional Parameters

This system variable does not have Optional Parameters.

Server Culture

Returns - This system variable returns the server’s configured culture.

SysVar Tag - {SERVER_CULTURE, format=name}

Optional Parameters

If the format=name option is used, this system variable returns the culture name. Otherwise, it returns the culture code.

Server Name

Returns - This system variable returns the name of the server.

SysVar Tag - {SERVER_NAME}

Optional Parameters

This system variable does not have optional parameters.

Server Version

This system variable returns the server’s version.

SysVar Tag - {SERVER_VERSION, format=string}

Optional Parameters

Using the format=String Optional Parameters returns a string containing the server’s version. Otherwise, this system variable returns the version number.

Server Variable

Returns - This system variable returns the data contained within any http server variable.

SysVar Tag - {Server_Variable, Name=[ any http server variable] }

Optional Parameters

This system variable does not have Optional Parameters.

Session

Returns - The session system variable returns the session variable for the current user.

SysVar Tag - {SESSION}

Optional Parameters

This system variable does not have Optional Parameters.

SQL Permission

Returns - This system variable returns information about a permission. It can be used to verify that a user has a certain permission for a certain object. The ID of the relevant object is passed via the ID parameter, the User ID of the user is passed through the UserID parameter, and the type of permission being queried is passed through the PermType parameter.

SysVar Tag - {SQL_PERM, ID=object ID, UserID=User’s User ID, PermType=VIEW|MODIFY|DELETE|RUN}

Optional Parameters

This system variable does not have Optional Parameters.

Sequence Number

Returns - This system variable returns a value which increments every time the system variable is referenced.

SysVar Tag - {SEQ_NUM:groupName, Digits=someNumber, Format=GUID}

Optional Parameters

This system variable can be formatted using the Digits= parameter. You can specify the number of digits that this number should display with. A group name allows you to have separate sequence numbers. Each group name’s sequence number is updated individually. Therefore a variable {SEQ_NUM:group1} would not increment the variable {SEQ_NUM:group2} when referenced. Setting the Format=GUID parameter causes the sequence number to be generated using a Globally Unique Identifier.

String

Returns - The String system variable returns the value of a localized string in the relevant resource file. The localized string is referenced by its name in the resource file.

SysVar Tag - {STRING:string_name, ResourceType=Internal|Custom}

Optional Parameters

This system variable has a formatting option called “type”. This can be set either to “internal” or “custom”. If set to “internal”, the string will reference a Process Director-defined string, whereas when type is set to “custom”, it will reference a string defined by the user in a resource INSTALL.

String (Right-Hand Side Menu)

image

Returns - This option will allow the user to specify a string to be used in a comparison. It is not technically a system variable.

Sum

Returns - This system variable returns the numerical sum of all the fields in a column of an array.

SysVar Tag - {SUM, Column=name of field in an array}

Optional Parameters

This system variable does not have Optional Parameters.

Temp File Path

Returns - This system variable returns a fully-qualified file path to an unused, unique, file name.

SysVar Tag - {TEMP_FILE_PATH, APPEND=”.[FILE EXTENSION]”,PREPEND=”[PREFIX]”}

Optional Parameters

PREPEND: The parameter accepts a string containing any characters the user wishes to add as a prefix to the file name.

APPEND: The parameter accepts a string containing the file extension for the target file, e.g. “.xslx” for an Excel file.

Temp Folder

Returns - This system variable returns a file path to a temporary file folder.

SysVar Tag - {TEMP_FOLDER}

Optional Parameters

This system variable does not have Optional Parameters.

User

Returns - This system variable returns a user given a userID and an authentication type.

SysVar Tag - {USER, userid=someUserID, auth=[SAML|BUILTIN|AD|WINDOWS|LDAP|EXTERNAL]}

Optional Parameters

This system variable can be formatted via the standard User system variable formatting options.

Web Site Path

Returns - This system variable returns a file path to the root file folder of the web site generated by the current instance of the Process Director installation.

SysVar Tag - {WEB_SITE_PATH}

Optional Parameters

This system variable does not have Optional Parameters.

  • Was this article helpful?