Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
absoluteUrltrue

Introduction

What

...

are Hash Variable?

Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

Hash Variables gives users greater flexibility and freedom in accessing useful information or relevant run-time 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 Joget components.

...


Here's some examples:
Code Block
titleExample
#date.{envVariable.dateFormat}#
#user.{variable.username}.firstName#
#form.tableChild.field1[{form.tableParent.childId}]#


Form Hash Variable by Index

You can pass an index or primary key value to a Hash Variable for retrieval.

The syntax for the inner Hash Variable is wrapped by a pair of [square brackets] .

Code Block
languagejava
titleSyntax / Format
#form.myTable.fieldId.[primaryKeyValue]#

Here are some examples:

Code Block
titleExample
#form.contact.name.[007]#

Escaping the Resultant Hash Variable

The parsed/returned Hash Variable may cause incompatibility with the current context/environment such as syntax error in a script.Therefore Therefore, one may pass in additional parameters into the hash variable declared to escape certain characters.Before  Before ending a hash variable with a hash "#", add a question mark character "?" followed by the required format. You may include multiple by defining semicolon ";" separated values.

...

Code Block
titleExample
#envVariable.script?java#
#envVariable.script?nl2br;json#
#form.table.users?separator(, )#
Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature
nl2br and separator are new features in Joget v6.


List Of Joget DX Hash Variables

Workflow Assignment Hash Variable

...