You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Hash Variable

Hash Variables gives users greater flexibility and freedom in accessing useful information or relevant runtime values from the system.

A hash variable is a special hash-escaped keyword that can be used in

  • Form Builder
  • Datalist Builder
  • Userview Builder
  • Supported plugin configuration properties
  • Activity name in Workflow Designer
  • External Form URL when mapping an activity to an external form

to return the value of some useful runtime variables from Workflow Engine.

Hash Variables supports:

  • Performer
  • Internationalization support on application
  • Request Parameters
  • Application level environment variable
  • Current User
  • Assignment
  • Form
  • Workflow Variable
  • Date
  • User

Hash Variables

Assignment

To get workflow activity information of the current assignment:

  • #assignment.processId#
  • #assignment.processDefId#
  • #assignment.processName#
  • #assignment.processName#
  • #assignment.processVersion#
  • #assignment.processRequesterId#
  • #assignment.description#
  • #assignment.activityId#
  • #assignment.activityName#
  • #assignment.activityDefId#
  • #assignment.assigneeId#

Performer

To get user information of the performer of an activity:

  • #performer.activityDefId.id#
  • #performer.activityDefId.username#
  • #performer.activityDefId.firstName#
  • #performer.activityDefId.lastName#
  • #performer.activityDefId.email#
  • #performer.activityDefId.active#
  • #performer.activityDefId.timeZone#

To get activityDefId (activity definition ID), mouseover the activity name in the Activity Mapping tab (Workflow Management Console); there will be an overlay showing the ID.

Form

To get data from form table:

  • #form.formDataTableName.fieldId#
  • #form.formDataTableName.fieldId[KB:record id]# (Only available in 3.1)

For example:

#form.registration.registeredDate#
#form.registration.registeredDate[0001]#
#form.registration.registeredDate[{variable.recordId}]# //using nested Hash Variable with curly bracket.

Workflow Variable

To get the value of a workflow variable:

  • #variable.variableName#

For example:

 #variable.approvalStatus#

Date

To get date time according to a specified format:

For example: 

#date.h:mm a# // 12:08 PM
#date.EEE, d MMM yyyy h:mm:ss a# // Wed, 4 Jul 2009 12:08:56 PM

User

To get user information based on username:

  • #user.username.id#
  • #user.username.username#
  • #user.username.firstName#
  • #user.username.lastName#
  • #user.username.email#
  • #user.username.active#
  • #user.username.timeZone#

For example:

#user.admin.email#

Apart from all of the existing Hash Variables supported in Joget version 2 as described above, these are the new hash variables supported in v3.

Other Hash Variables 

Nested Hash Variable 

Since version 3.0.3, a Hash Variable can be used inside another Hash Variable to form a Nested Hash Variable. The syntax for the inner Hash Variable is wrapped by a pair of curly bracket '{' and '}'.

Syntax:

#prefix.{prefix.variableKey}#

Example:

#date.{envVariable.dateFormat}#
#user.{variable.username}.firstName#
#form.tableChild.field1[{form.tableParent.childId}]#
  • No labels