Versions Compared

Key

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

...

What are Hash Variables?

English

Hash

Variables give users greater flexibility and freedom in accessing useful information or relevant run-time values from the system

variables in Joget are placeholders used to dynamically display data within applications. They allow users to insert dynamic content without hardcoding values, which enhances flexibility and customization. Hash variables can fetch and display data from various sources such as forms, workflows, and the system itself. They promote customization and flexibility by avoiding hardcoded values, ultimately improving the user-friendliness of Joget applications.

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

...

NameDescription
PrefixuserviewKey
Description

Userview Key Hash Variable is used solely for the purpose of accessing the current UI key's value.

Typical use case for this hash variable are:-

  • Filtering a List based on UI Key.
  • Preloading certain form data field (e.g. subform) in a Form or Form part of a process flow based on UI Key.
Attributes
  • #userviewKey#
Scope of Use

Workflow Variable Hash Variable

...

NameDescription
PrefixuiListCount
Description

The uiListCount hash variable is primarily utilized to retrieve the Datalist or Inbox menu count value.

Attributes
  • #uiListCount.MENU_ID#
  • #uiListCount.UI_ID.MENU_ID#
Scope of Use
  • All components within the App except UI Permission.
Warning

uiListCount cannot be used inside UI permission. This is due to:
1. UI permission contains a uiListCount hash variable
2. uiListCount Hash requires UI to load to get the count
3. In order to load the UI design,  the UI permission will be called. It goes back to step 1.
(Will cause an infinite recursion that eventually returns a StackOverflow exception error :

 ERROR 15 May 2024 09:27:20 org.apache.jsp.WEB_002dINF.jsp.error500_jsp - Handler dispatch failed; nested exception is java.lang.StackOverflowError2org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.StackOverflowError
Caused by: java.lang.StackOverflowError



Sample Attributes

See examples below, based on the usage within the default CRM application:

  • #uiListCount.MENU_ID# where MENU_ID is the id of the menu in your Userview for Datalist or Inbox (Example usage: "#uiListCount.proposal_inbox_list#")
  • #uiListCount.UI_ID.MENU_ID# where UI_ID is the id of the Userview (Example usage: "#uiListCount.crm_userview_sales.proposal_inbox_list#")

...