...
Panel |
---|
borderColor | green |
---|
borderWidth | 1 |
---|
titleBGColor | #ddffcc |
---|
borderStyle | solid |
---|
title | Definition |
---|
|
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. |
Tip |
---|
To conveniently access the list of all hash variables available, use shortcut combination Ctrl-Shift-3 in any of the components above. |
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 Hash Variable can be used inside another Hash Variable to form a Nested Hash Variable.
...
Name | Description |
---|
Prefix | request |
Description | To get the value from the current HttpServletRequest object of the page view. |
Attributes | - #request.characterEncoding#
- #request.contextPath#
- #request.header.NAME#
# , where NAME is the custom header name. - #request.locale#
- #request.method#
- #request.pathInfo#
- #request.protocol#
- #request.queryString#
- #request.remoteAddr#
- #request.requestURI#
- #request.requestURL#
- #request.requestedSessionId#
- #request.scheme#
- #request.serverName#
- #request.serverPort#
- #request.servletPath#
|
Scope of Use | - All components within the App where there is valid HttpServletRequest object. Such object will not be available in background activity such as in Process Tool triggered as a result of Deadlines.
|
Sample Attributes |
To retrieve the "Referer" header attribute value in the screenshot above, one may use the following hash variable. Code Block |
---|
| #request.header.Referer# |
|
...
Name | Description |
---|
Prefix | platform |
Description | To retrieve platform specific information. |
Attributes | #platform.name# #platform.version# #platform.jdbcDriver# #platform.setting.dataFileBasePath# #platform.setting.deadlineCheckerInterval# #platform.setting.defaultUserview# #platform.setting.fileSizeLimit# #platform.setting.landingPage# #platform.setting.systemDateFormat# #platform.setting.systemLocale# #platform.setting.systemTimeZone#
In Joget Enterprise edition, these additional attributes are available:- #platform.license.name# #platform.license.holder# #platform.license.users# #platform.license.appLimit# #platform.license.expiry# #platform.license.activated# #platform.systemKey#
|
Scope of Use | - All components within the App.
|
Users Hash Variable
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
This is a new feature in Joget Workflow v6. |
Name | Description |
---|
Prefix | users |
Description | To retrieve information of all the users in the selected group, grade, department and organization. Multiple results will be separated by semicolon. |
Attributes | #users.group.GROUP_ID.username# #users.group.GROUP_ID.firstName# #users.group.GROUP_ID.lastName# #users.group.GROUP_ID.fullName# #users.group.GROUP_ID.email#
#users.grade.GRADE_ID.username# #users.grade.GRADE_ID.firstName# #users.grade.GRADE_ID.lastName# #users.grade.GRADE_ID.fullName# #users.grade.GRADE_ID.email#
#users.department.DEPARTMENT_ID.username# #users.department.DEPARTMENT_ID.firstName# #users.department.DEPARTMENT_ID.lastName# #users.department.DEPARTMENT_ID.fullName# #users.department.DEPARTMENT_ID.email#
#users.organization.ORGANIZATION_ID.username# #users.organization.ORGANIZATION_ID.firstName# #users.organization.ORGANIZATION_ID.lastName# #users.organization.ORGANIZATION_ID.fullName# #users.organization.ORGANIZATION_ID.email#
|
Scope of Use | - All components within the App.
|
Sample Attributes | To return all the users in the current user's groups id: |
...
Name | Description |
---|
Prefix | beanshell |
Description | Using environment variable to execute bean shell script. Passing parameter using URL query string syntax. |
Attributes | |
Scopeof Use | - All components within the App.
|
Sample Attributes | To execute a script stored in "welcome" environment variable with parameter "username" and "dept": Code Block |
---|
| if (username != null && username.length == 1 && !username[0].isEmpty()) {
return "Welcome " + username[0] + " (" + dept[0] + "),";
} else {
return "";
} | - #beanshell.welcome[username={currentUser.username}&dept={currentUser.department.name}]#
|
...