Versions Compared

Key

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

Table of Contents
outlinetrue
absoluteUrltrue

...

ตัวแปรแฮช คืออะไร ?

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.

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

A Hash Variable can be used inside another Hash Variable to form a Nested Hash Variable.

ตัวแปรแฮชช่วยให้ผู้ใช้มีความยืดหยุ่นและอิสระมากขึ้นในการเข้าถึงข้อมูลที่เป็นประโยชน์หรือค่าที่เกี่ยวข้องเวลาการทำงานของระบบ

ตัวแปรแฮชเป็นคีย์หลักพิเศษที่สามารถใช้ได้ใน :

  • ตัวสร้างฟอร์ม (Form Builder)
  • ตัวสร้างดาตาลิสต์ (Datalist Builder)
  • ตัวสร้างมุมมองผู้ใช้ (Userview Builder)
  • คุณสมบัติการกำหนดค่าปลั๊กอินที่สนับสนุน
  • ชื่อกิจกรรมในโปรแกรมออกแบบลำดับงาน
  • URL ของฟอร์มภายนอกเมื่อทำการแม็ปกิจกรรมไปยังฟอร์มภายนอก

เพื่อกลับค่าของตัวแปรรันไทม์ที่มีประโยชน์บางอย่างจากส่วนประกอบ Joget

Tip

เพื่อความสะดวกในการเข้าถึงรายการของตัวแปรแฮช ทั้งหมดที่มีอยู่ให้ใช้ทางลัด Ctrl-Shift-3 ในส่วนประกอบข้างต้น

Tip

ดาวน์โหลดแอพช่วยสอน Hash Variables จาก Joget Workflow Marketplace เพื่อเรียนรู้เพิ่มเติมเกี่ยวกับตัวแปรแฮช


ตัวแปรแฮช ที่ซ้อนกัน (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}#
Here's some examplesนี่คือตัวอย่างบางส่วน:
Code Block
titleExample
#date.{envVariable.dateFormat}#
#user.{variable.username}.firstName#
#form.tableChild.field1[{form.tableParent.childId}]#


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, one may pass in additional parameters into the hash variable declared to escape certain characters.

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.

ตัวแปรแฮช ที่แยกวิเคราะห์/ส่งคืนอาจทำให้เกิดความเข้ากันไม่ได้กับบริบท/สภาพแวดล้อมปัจจุบันเช่นข้อผิดพลาดทางไวยากรณ์ในสคริปต์

ดังนั้น อาจผ่านหนึ่งในพารามิเตอร์เพิ่มเติมในตัวแปรแฮช ประกาศให้เลี่ยงอักขระบางอย่าง

ก่อนที่จะสิ้นสุดตัวแปรแฮช ด้วย "#" ให้เพิ่มเครื่องหมายคำถาม "?" ตามด้วยรูปแบบที่ต้องการ คุณอาจรวมได้โดยการกำหนดเครื่องหมายอัฒภาค ";" ค่าที่คั่นด้วย

  1. regex - ใช้ในการเลี่ยงนิพจน์ปกติของอักขระพิเศษ
  2. json - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ JSON
  3. javascript - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ Javascript
  4. html - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ HTML
  5. xml - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ XML
  6. java - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ Java
  7. sql - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ SQL
  8. url - ใช้เพื่อเลี่ยงตัวอักขระพิเศษของ URL
  9. nl2br - ใช้เพื่อแปลงอักขระบรรทัดใหม่เป็นแท็ก HTML < br >
  10. regex - Used to escape regular expression special characters
  11. json - Used to escape JSON special characters
  12. javascript - Used to escape Javascript special characters
  13. html - Used to escape HTML special characters
  14. xml - Used to escape XML special characters
  15. java - Used to escape Java special characters
  16. sql - Used to escape SQL special characters
  17. url - Used to escape URL special characters
  18. nl2br - Used to convert new line character to <br> HTML tag
  19. separator(SEPARATOR_CHARS) - Used to change the default separator  ใช้เพื่อเปลี่ยนตัวคั่นเริ่มต้น ";" to the SEPARATOR เป็น  SEPARATOR_CHARS. eg. ?separatorตัวคั่น(, ) resulted ส่งผลให้ "abc, def" instead of แทนที่เป็น "abc;def".
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 nl2br และตัวคั่นเป็นคุณลักษณะใหม่ใน Joget Workflow v6.


รายการของตัวแปรแฮช (List of Hash Variables)

Table of Contents
minLevel2
absoluteUrltrue

ตัวแปรแฮช ของการกำหนดลำดับงาน (Workflow Assignment Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew

New attributes added in Joget เป็นแอตทริบิวต์ใหม่ที่เพิ่มใน Joget Workflow v6.

  • processDefIdWithoutVersion
  • appId
Nameชื่อDescriptionคำอธิบาย
Prefixassignment
Description

To get workflow activity information of the current assignment.หากต้องการรับข้อมูลกิจกรรมลำดับงานของการมอบหมายปัจจุบัน

Attributes
  • #assignment.processId#
  • #assignment.processDefId#
  • #assignment.processDefIdWithoutVersion#
  • #assignment.processName#
  • #assignment.processVersion#
  • #assignment.processRequesterId#
  • #assignment.appId#
  • #assignment.activityId#
  • #assignment.activityName#
  • #assignment.activityDefId#
  • #assignment.assigneeId#
Scope of Use
  • Elements within and part of a Process.
    1. Activity Name.
    2. Form mapped as part of process activity mapping.
    3. Email Tool configuration as part of process tool mapping.
  • องค์ประกอบภายในและส่วนหนึ่งของกระบวนการ
    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แม็ปเป็นส่วนหนึ่งของการแม็ปกิจกรรมกระบวนการ
    3. การกำหนดค่าเครื่องมือ Email เป็นส่วนหนึ่งของการแม็ปเครื่องมือกระบวนการ
Sample Attributes

แสดงชื่อของผู้ใช้

Sample Attributes

To display the assignee's name:

#user.{assignment.assigneeId}.firstName# #user.{assignment.assigneeId}.lastName#

ตัวแปรแฮช การลำดับงานของกระบวนการ (Workflow Process Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
Prefixprocess
Description

To retrieve information of a workflow process instance.เพื่อเรียกข้อมูลของอินสแตนซ์กระบวนการลำดับงาน

Attributes
  • #process.appId#

  • #process.processId#

  • #process.processDefId#

  • #process.processDefIdWithoutVersion#

  • #process.processName#

  • #process.processVersion#

  • #process.processRequesterId#

  • #process.state#

  • #process.startedTime#

  • #process.limit#

  • #process.due#

  • #process.delay#

  • #process.delayInSeconds#

  • #process.finishTime#

  • #process.timeConsumingFromDateStarted#

  • #process.timeConsumingFromDateStartedInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.instanceId#

  • #process.activityInst.ACTIVITY_DEF_ID.name#

  • #process.activityInst.ACTIVITY_DEF_ID.status#

  • #process.activityInst.ACTIVITY_DEF_ID.state#

  • #process.activityInst.ACTIVITY_DEF_ID.type#

  • #process.activityInst.ACTIVITY_DEF_ID.startedTime#

  • #process.activityInst.ACTIVITY_DEF_ID.limit#

  • #process.activityInst.ACTIVITY_DEF_ID.limitInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.due#

  • #process.activityInst.ACTIVITY_DEF_ID.delay#

  • #process.activityInst.ACTIVITY_DEF_ID.delayInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.finishTime#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStarted#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStartedInSeconds#

  • #process.activityInst.ACTIVITY_DEF_ID.performer#

  • #process.activityInst.ACTIVITY_DEF_ID.performerUser#

  • #process.activityInst.ACTIVITY_DEF_ID.assignmentUsers#


  • #process.appId[PROCESS_INSTANCE_ID]#

  • #process.processDefId[PROCESS_INSTANCE_ID]#

  • #process.processDefIdWithoutVersion[PROCESS_INSTANCE_ID]#

  • #process.processName[PROCESS_INSTANCE_ID]#

  • #process.processVersion[PROCESS_INSTANCE_ID]#

  • #process.processRequesterId[PROCESS_INSTANCE_ID]#

  • #process.startedTime[PROCESS_INSTANCE_ID]#

  • #process.limit[PROCESS_INSTANCE_ID]#

  • #process.due[PROCESS_INSTANCE_ID]#

  • #process.delay[PROCESS_INSTANCE_ID]#

  • #process.delayInSeconds[PROCESS_INSTANCE_ID]#

  • #process.finishTime[PROCESS_INSTANCE_ID]#

  • #process.timeConsumingFromDateStarted[PROCESS_INSTANCE_ID]#

  • #process.timeConsumingFromDateStartedInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.instanceId[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.name[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.status[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.state[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.type[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.startedTime[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.limit[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.limitInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.due[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.delay[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.delayInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.finishTime[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStarted[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.timeConsumingFromDateStartedInSeconds[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.performer[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.performerUser[PROCESS_INSTANCE_ID]#

  • #process.activityInst.ACTIVITY_DEF_ID.assignmentUsers[PROCESS_INSTANCE_ID]#

Scope of Use
  • Elements within and part of a Process.
    1. Activity Name.
    2. Form mapped as part of process activity mapping.
    3. Email Tool configuration as part of process tool mapping.
  • องค์ประกอบภายในและส่วนหนึ่งของกระบวนการ
    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แม็ปเป็นส่วนหนึ่งของการแม็ปกิจกรรมกระบวนการ
    3. การกำหนดค่าเครื่องมือ Email เป็นส่วนหนึ่งของการแม็ปเครื่องมือกระบวนการ
Sample Attributes

เพื่อแสดงชื่อผู้ใช้ของอินสแตนซ์กิจกรรมของอินสแตนซ์ของกระบวนการ

Sample AttributesTo display the performer username of an activity instance of a process instance

:

#process.activityInst.assign.performerUser[{assingment.processId}]#

ตัวแปรแฮช ของผู้ใช้ปัจจุบัน (Current User Hash Variable)

Nameชื่อDescriptionคำอธิบาย
PrefixcurrentUser
DescriptionTo retrieve currently logged in user information.  ในการเรียกข้อมูลผู้ใช้ที่บันทึกไว้ในปัจจุบัน
Attributes
  • #currentUser.id#
  • #currentUser.username#
  • #currentUser.firstName#
  • #currentUser.lastName#
  • #currentUser.email#
  • #currentUser.active#
  • #currentUser.timeZone#

In ใน Joget Enterprise edition, these additional attributes are available แอตทริบิวต์เพิ่มเติมเหล่านี้จะสามารถใช้งาน::-

User Meta

  • #currentUser.meta.KEY#
    To read additional user meta data stored in ในการอ่านข้อมูลเมตาของผู้ใช้เพิ่มเติมที่เก็บไว้ในตาราง dir_user_meta table.
    Example: #currentUser.meta.duration#.

    Panel
    borderColorpurple
    borderWidth1
    titleBGColor#ddccff
    borderStylesolid
    titleNew Feature

    This is a new feature in Joget Workflow v6.

    นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

องค์กร (Organization)Organization

  • #currentUser.organization.id#
  • #currentUser.organization.name#
  • #currentUser.organization.description#

แผนก (Department)

  • #currentUser.department.id#
  • #currentUser.department.name#
  • #currentUser.department.description#
  • #currentUser.department.treeStructure#

ระดับ (Grade)

  • #currentUser.grade.id#
  • #currentUser.grade.name#
  • #currentUser.grade.description#
  • #currentUser.grade.organizationId#

HOD

  • #currentUser.hod.username#
  • #currentUser.hod.firstName#
  • #currentUser.hod.lastName#
  • #currentUser.hod.email#
  • #currentUser.hod.active#
  • #currentUser.hod.timeZone#

กลุ่ม (Group)

  • #currentUser.groups.id#
  • #currentUser.groups.name#

พนักงาน (Employment)

  • #currentUser.employee.code#
  • #currentUser.employee.jobTitle#
  • #currentUser.employee.isHod#

แผนก HOD (Department HOD)

  • #currentUser.department.hod.username#
  • #currentUser.department.hod.firstName#
  • #currentUser.department.hod.lastName#
  • #currentUser.department.hod.email#
  • #currentUser.department.hod.active#
  • #currentUser.department.hod.timeZone#
Scope of Use
    All components within the
  • ส่วนประกอบทั้งหมดภายใน App
  • .

ตัวแปรแฮช ของวันที่ (Date Hash Variable

...

)

Nameชื่อDescriptionคำอธิบาย
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. ค่าที่ส่งคืนจะทำตามค่าปัจจุบันที่เข้าสู่ระบบในเขตเวลาของผู้ใช้ ถ้าข้อมูลของผู้ใช้ไม่พร้อมใช้งานจะใช้เขตเวลาของเซิร์ฟเวอร์

AttributesAttributes
  • #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
  • #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_TO defines the format to change to.TO กำหนดรูปแบบการเปลี่ยนแปลง

    Panel
    borderColorpurple
    borderWidth1
    titleBGColor#ddccff
    borderStylesolid
    titleNew Feature

    This is a new feature in Joget นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.


Scope of Use
    All components within the
  • ส่วนประกอบทั้งหมดภายใน App
  • .
Sample Attributes

#date.h:mm a# // shows current time of 12 แสดงเวลาปัจจุบัน 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  เพิ่ม 7 วันจากวันที่ปัจจุบัน - 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  ลบ 1 วันของวันที่ปัจจุบัน - 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

...

)

NameDescription
PrefixenvVariable
Description

To retrieve Environment Variable value. Learn more about Environment Variables .เพื่อดึงค่าของ ตัวแปรแวดล้อม เรียนรู้เพิ่มเติมเกี่ยวกับ ตัวแปรแวดล้อม (Environment Variable)

Attributes
  • #envVariable. keyName #
Scope of Use
  • Anywhere within the Joget app itself. (i.e. Process, Process Tool, Form, List, Userviewทุกที่ภายใน Joget app ตัวเอง (เช่น กระบวนการ (Process), เครื่องมือกระบวนการ (Process Tool), ฟอร์ม (Form), รายการ (List), มุมมองผู้ใช้ (Userview))
Sample Attributes#envVariable.smtpServer#
#envVariable.smtpPort#

ตัวแปรแฮช ของข้อมูลฟอร์ม (Form Data Hash

...

Variabl)

NameDescription
Prefixform
Description

To get field value from form table.การเรียกค่าเขตข้อมูลจากตารางแบบฟอร์ม

Attributes
  • #form. tableName . fieldId #
  • #form. tableName . fieldId [recordId]# (Available in 3.1 and above)
Scope of Use
  • In a Process Tool part of a Process.
  • In a Form.
  • In a process design.
  • ในส่วนของเครื่องมือกระบวนการของกระบวนการ
  • ในแบบฟอร์ม
  • ในการออกแบบกระบวนการ
Sample Attributes#form.registration.registeredDate# //will use the current record ID
#form.registration.registeredDate[ 0001 ]# //0001 is the record ID to seek for
#form.registration.registeredDate[{variable.recordId}]# //using nested Hash Variable with curly bracket.

ตัวแปรแฮช ของแบบฟอร์ม Binder (Form Binder Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
Prefixbinder
Description

จะได้รับ ค่าฟิลด์หรือป้ายชื่อเขตข้อมูลจากตัวยึดของฟอร์มผ่านทางรหัสข้อกำหนดฟอร์ม

คำนำหน้า 'binder' จะดึงค่าฟิลด์ในขณะที่คำนำหน้า

To get field value or field value label from the binder of a form via its form definition id .

The 'binder' prefix retrieves the field value, while the 'binder.options' prefix retrieves the lookup field (eg. select box, checkbox & radio button) option label.

The field value or field value label can also be obtained from other apps by including the APP_ID, else it uses the current app context.

จะดึงข้อมูลการค้นหา (เช่น กล่องเลือกช่องทำเครื่องหมาย & ปุ่มเรดิโอ)

นอกจากนี้ยังสามารถรับค่าของเขตข้อมูลหรือชื่อของเขตข้อมูลจากแอปอื่นๆได้โดยรวมถึง APP_ID ซึ่งจะใช้บริบทของแอปปัจจุบัน

โดยการให้อาร์กิวเมนต์ PRIMARY_KEY ค่าฟิลด์หรือชื่อเขตข้อมูลจากระเบียนอื่นสามารถเรียกข้อมูลอื่นจากรหัสเรกคอร์ดปัจจุบันจะถูกเรียกแทนBy providing the PRIMARY_KEY argument, field value or field value label from a different record can be retrieved, else data from the current record id is retrieved instead.

Attributes
  • #binder.APP_ID.FORM_DEF_ID.FIELD_ID#
  • #binder.APP_ID.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.FORM_DEF_ID.FIELD_ID#
  • #binder.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.options.APP_ID.FORM_DEF_ID.FIELD_ID#
  • #binder.options.APP_ID.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
  • #binder.options.FORM_DEF_ID.FIELD_ID#
  • #binder.options.FORM_DEF_ID.FIELD_ID[PRIMARY_KEY]#
Scope of Use
  • ในส่วนของเครื่องมือกระบวนการของกระบวนการ
  • ในแบบฟอร์ม
  • ในการออกแบบกระบวนการ
  • In a Process Tool part of a Process.
  • In a Form.
  • In a process design.
Sample Attributes

#binder.addCard.title#

#binder.cardViewer.addCard.title#

#binder.cardViewer.addCard.title[b30bce20-c0a82095-14976e70-fded1735]#

#binder.options.addCard.title#

#binder.options.cardViewer.addCard.title#

#binder.options.cardViewer.addCard.title[b30bce20-c0a82095-14976e70-fded1735]#

ตัวแปรแฮชของข้อกำหนดของแอป (App Definition Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in Joget นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
PrefixappDef
DescriptionTo retrieve App Definition information

การเรียกข้อมูลข้อกำหนดของแอป

Attributes
  • #appDef.appId#

  • #appDef.dateCreated#

  • #appDef.dateModified#

  • #appDef.version#

  • #appDef.license#

  • #appDef.name#

  • #appDef.published#

Scope of Use
    All components within the
  • ส่วนประกอบทั้งหมดภายใน App
  • .
Sample AttributesAttributes

หากต้องการแสดงชื่อข้อกำหนดของแอปTo display the app definition name:

#appDef.name#

ตัวแปรแฮชข้อความของแอป (App Message Hash Variable) (Internationalization)  

ชื่อคำอธิบาย
Prefixi18n
Description

เพื่อสนับสนุนการแปลภาษาในระดับแอพลิเคชัน

Attributes
  • #i18n. keyName #
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes

#i18n.logout#

Exampleโปรดดูที่ Add Message.

ตัวแปรแฮชของผู้กระทำ (Performer Hash Variable ) 

ชื่อคำอธิบาย
Prefixperformer
Description

เพื่อรับข้อมูลผู้ใช้ของผู้กระทำของกิจกรรม

Attributes
  • #performer. activityDefId .id#
  • #performer. activityDefId .username#
  • #performer. activityDefId .firstName#
  • #performer. activityDefId .lastName#
  • #performer. activityDefId .email#
  • #performer. activityDefId .active#
  • #performer. activityDefId .timeZone#
Scope of Use
  • องค์ประกอบภายในและเป็นส่วนหนึ่งของกระบวนการ

    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แมปเป็นส่วนหนึ่งของแมปกิจกรรมของกระบวนการ
    3. การกำหนดเครื่องมืออีเมล์เป็นส่วนหนึ่งของการแมปเครื่องมือกระบวนการ
Info

เพื่อรับ activityDefId (รหัสข้อกำหนดของกิจกรรม) ให้วางเมาส์เหนือชื่อกิจกรรมในแท็บการแม็ปกิจกรรม (การควบคุมการจัดการเวิร์กโฟลว์) จะมีการซ้อนทับแสดง ID

Warning

กิจกรรมที่เลือกจะต้องได้รับการดำเนินการแล้ว

Sample Attributes
  • #performer.runProcess.firstName#
  • #performer.submitLeave.firstName#

ตัวแปรแฮชของการร้องขอพารามิเตอร์ (Request Parameter Hash Variable)   

ชื่อคำอธิบาย
PrefixrequestParam
Description

ในการเข้าถึงค่าของการร้องขอพารามิเตอร์

Attributes
  • #requestParam.parameterName[separator]#
  • ตัวคั่น (หรือ;) สามารถระบุได้ว่าการร้องขอใช้ในตัวกรองข้อมูลที่มีหลายค่าเพื่อกำหนดอักขระตัวคั่นในเอาต์พุตข้อมูล เครื่องหมายจุลภาค ","จะใช้เป็นค่าเริ่มต้นถ้าไม่มีการระบุตัวคั่น
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes
  • #requestParam.key# สามารถนำมาใช้โดยเฉพาะเพื่อรับ Userview Key value.
  • #requestParam.name[;]# เพื่อระบุตัวแปร 'name' จะเก็บค่าหลายค่าคั่นด้วยเครื่องหมายอัฒภาค ตัวอย่างเช่นคำสั่ง SQL นี้ "select * from expenses where title in (#requestParam.title[,]#)" จะได้รับการแปลเป็น  "select * from expenses where title in (a,b,c)" เพื่อรองรับหลายค่าในคำสั่ง "where-in" 
  • ในเพจ Userview อาจเข้าถึงแอตทริบิวต์ต่อไปนี้
    • #requestParam.key#
    • #requestParam.userviewId#
    • #requestParam.menuId#
    • #requestParam.appId#

ตัวแปรแฮชของผู้ใช้ (User Hash Variable)   

ชื่อคำอธิบาย
Prefixuser
Description

เพื่อรับข้อมูลผู้ใช้โดยอิงจาก username.

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

ใน Joget Enterprise edition แอตทริบิวต์เพิ่มเติมเหล่านี้จะพร้อมใช้งาน:-

User Meta

  • #user. username .meta.KEY#
    ในการอ่านข้อมูลเมตาของผู้ใช้เพิ่มเติมที่เก็บไว้ในตาราง dir_user_meta 
    ตัวอย่าง: #user.cat.meta.duration# จะรีเทิร์นค่า "100".

Organization

  • #user. username .organization.id#
  • #user. username .organization.name#
  • #user. username .organization.description#

Department

  • #user. username .department.id#
  • #user. username .department.name#
  • #user. username .department.description#
  • #user. username .department.treeStructure#

Grade

  • #user. username .grade.id#
  • #user. username .grade.name#
  • #user. username .grade.description#
  • #user. username .grade.organizationId#

HOD

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

Group

  • #user. username .groups.id#
  • #user. username .groups.name#

Employment

  • #user. username .employee.code#
  • #user. username .employee.jobTitle#
  • #user. username .employee.isHod#

Department HOD

  • #user. username .department.hod.username#
  • #user. username .department.hod.firstName#
  • #user. username .department.hod.lastName#
  • #user. username .department.hod.email#
  • #user. username .department.hod.active#
  • #user. username .department.hod.timeZone#
Scope of Use
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes
  • #user.admin.email#
  • #user.cat.firstName#
  • #user.{requestParam.username}.email# เพื่อดึงที่อยู่อีเมลของผู้ใช้ที่ส่งผ่านพารามิเตอร์ url

ตัวแปรแฮชของ Userview Key (Userview Key Hash Variable)   

ชื่อคำอธิบาย
PrefixuserviewKey
Description

ตัวแปรแฮชของ Userview Key ถูกใช้เพื่อวัตถุประสงค์ในการเข้าถึง Userview key's value ปัจจุบันเท่านั้น

กรณีการใช้งานทั่วไปสำหรับตัวแปร hash นี้คือ:-

  • การกรองข้อมูลตาม Userview Key
  • การโหลดล่วงหน้าฟิลด์ข้อมูลฟอร์มบางอย่าง (เช่นฟอร์มย่อย) ในแบบฟอร์มหรือส่วนหนึ่งของผังกระบวนการตาม Userview Key
Attributes
  • #userviewKey#
Scope of Use

ตัวแปรแฮชของตัวแปรเวิร์กโฟลว์ (Workflow Variable Hash Variable)

ชื่อคำอธิบาย
Prefixvariable
Description

เพื่อรับค่าของตัวแปรเวิร์กโฟลว์ใน Process Flow

Attributes
  • #variable. variableName #
Scope of Use
  • องค์ประกอบภายในและเป็นส่วนหนึ่งของกระบวนการ

    1. ชื่อกิจกรรม
    2. แบบฟอร์มที่แมปเป็นส่วนหนึ่งของแมปกิจกรรมของกระบวนการ
    3. การกำหนดเครื่องมืออีเมล์เป็นส่วนหนึ่งของการแมปเครื่องมือกระบวนการ
Sample Attributes#variable.approvalStatus#

Request Hash Variable

Nameชื่อDescriptionคำอธิบาย
Prefixrequest
Description

To get the value from the current HttpServletRequest object of the page view.เพื่อรับค่าจากวัตถุ HttpServletRequest ปัจจุบันของมุมมองเพจ

Attributes
  • #request.characterEncoding#
  • #request.contextPath#
  • #request.header.NAME# , where NAME is the custom header name. โดยที่ 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
  • ส่วนประกอบทั้งหมดภายใน App ที่มีวัตถุ Httpservletrequest ที่ถูกต้อง วัตถุดังกล่าวจะไม่พร้อมใช้งานในกิจกรรมพื้นหลังเช่นในเครื่องมือกระบวนการที่ทริกเกอร์เป็นผลมาจากกำหนดเวลา
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.อ้างถึง" ในภาพหน้าจอด้านบนหนึ่งอาจใช้ตัวแปร hash ต่อไปนี้

Code Block
titleHash Variable
#request.header.Referer#

ตัวแปรแฮชของแพลตฟอร์ม (Platform Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
Prefixplatform
DescriptionTo 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
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
Prefixusers
DescriptionTo 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.
  • ส่วนประกอบทั้งหมดภายใน App
Sample Attributes

หากต้องการส่งคืนผู้ใช้ทั้งหมดในรหัสกลุ่มของผู้ใช้ปัจจุบัน

Sample Attributes

To return all the users in the current user's groups id:

ตัวแปรแฮชของ Bean Shell (Bean Shell Hash Variable)

Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

This is a new feature in นี่คือฟีเจอร์ใหม่ใน Joget Workflow v6.

Nameชื่อDescriptionคำอธิบาย
Prefixbeanshell
DescriptionUsing environment variable to execute bean shell script. Passing parameter using URL query string syntax.การใช้ตัวแปรสภาพแวดล้อมเพื่อรันสคริปต์ Bean Shell ส่งผ่านพารามิเตอร์โดยใช้ไวยากรณ์สตริงค้นหา URL
Attributes
  • #beanshell.ENVIRONMENT_VARIABLE#

  • #beanshell.ENVIRONMENT_VARIABLE[PARAMETERS_URL_QUERY_STRING]#

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
languagejava
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}]#

...