Versions Compared

Key

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

...

Tip

Download the tutorial app on Hash Variables from Joget Workflow Marketplace to learn more about Hash Variable.

 

Nested Hash Variable

Since version 3.0.3, a 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}.

Code Block
languagejava
titleSyntax / Format
#prefix.{prefix.variableKey}#

...

The parsed/returned Hash Variable may cause incompatibility with the current context/environment such as syntax error in a script.

Therefore, one may pass in additional parameters into the hash variable declared to escape certain characters.

...

NameDescription
Prefixdate
Description

To get date time according to a specified format.

Info
titleLocalization

In Joget Workflow v5, the returned value would follow current logged in user's timezone. If user's information is not available, then it will use server's timezone.

Attributes
  • #date.dateFormat#
  • #date.dateUnit[+-]integerValue.dateFormat#

Info
titleOptions

dateFormat

  • In Java date format; e.g., yyyy-MM-dd for 2011-06-01

dateUnit

  • YEAR
  • MONTH
  • DAY

integerValue

  • Numeric integer value. E.g. 10
Scope of Use
  • All components within the App.

 

  • #date.DATE_FORMAT_TO[INPUT_DATE_VALUE | INPUT_VALUE_FORMAT]#

 

Info

INPUT_DATE_VALUE accepts any date value and even nested hash variables, e.g: form data hash variable. See example in sample attributes below.

INPUT_VALUE_FORMAT is the INPUT_DATE_VALUE original format.

DATE_FORMAT_TOdefines the format to change to.

Scope of Use
  • All components within the App.
Sample Attributes

#date.h:mm a# // shows current time of

Sample Attributes#date.h:mm a# //

12:08 PM

#date.EEE,d MMM yyyy h:mm:ss a# // shows current date time of Wed, 4 Jul 2014 12:08:56 PM

#date.DAY+7.EEE,d MMM yyyy h:mm:ss a# // Add 7 days on top of current date time - Wed, 11 Jul 2014 12:08:56 PM

#date.DAY-1.EEE,d MMM yyyy h:mm:ss a# // Minus 1 days on top of current date time - Wed, 3 Jul 2014 12:08:56 PM

#date.dd-MM-yyyy[{form.j_expense_claim.title}|yyyy-MM-dd]# // Retrieves date from j_expense_claim table, form field title, changes its origin format of yyyy-MM-dd to dd-MM-yyyy.

Environment Variable Hash Variable  

...