Versions Compared

Key

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

Table of Contents


Introduction

Hash variable type plugin which allows to search by other column. If there are more than one results for one hash, it will return the most recent input result into the database.


Available Formats

  • #formLookup.TABLE.COLUMN[CONDITION=VALUE]#
  • #formLookup.TABLE.COLUMN[CONDITION1=VALUE1,CONDITION2=VALUE2]#


Example

  • #formLookup.staff.staffName[staffNo=123]#


Plugin Info

Plugin Available in the Bundle:

  1. Column Search Hash Variable

This plugin bundle is compatible with Joget DX 8.


Expected Outcome

To be able to search by other column using hash variables.


Getting Started

Steps

Where to get the plugin

You can get the plugin from https://github.com/jogetoss/column-search-hash-variable/releases. Upload the plugin to Joget by navigating to Settings > Manage Plugins > Upload Plugin as admin.

How to use the plugin

1. Just for reference on how the hash variable works, create a form with any three fields.

Figure 1: Form 1 with three fields: Name, Gender, Age


2. Click on Generate App, Generate a list and a CRUD.

Figure 2: Generate List and CRUD for form


3. Create another form to use the column search hash variables. The table below shows the value configured at the field value.

Field NameField ValueDescription
Format #1#formLookup.cshvsa_form1.name[gender=female]#Retrieve name when gender is female
Format #2#formLookup.cshvsa_form1.name[gender=male,age=10]#Retrieve name when gender is female and age is 10
Format #3#formLookup.cshvsa_form1.gender[name={currentUser.username}]#Retrieve gender when name is current username (Admin). This demonstrates the usage of nested hash variable.

Table 1: Field Name and Field Value for Hash Variable

Figure 3: Form with Column Search Hash Variable


4. Go to UI Builder to pull the form with hash variable into the UI.

Figure 4: Insert Form with Column Search Hash Variable to UI


5. Launch the UI. Let us submit some data into the Form 1.

Figure 5: Submit Dummy Data into Form 1


6. Click on the form with hash variable. You can see that the values have been retrieved by referring to other columns.

Figure 6: Form with Column Search Hash Variable Value


7. Input another record with Gender Male and Age 10. 

Figure 7: Submit Duplicate Data into Form 1


8. You can see for Format#2, the value has been changed to the recent input value, "Ken" replacing the old value "Jack".

Figure 8: Form with Column Search Hash Variable Latest Value


9. If there are no record found, it will follow the rules as in Hash Variable - Return Values.

Figure 9: Form with Column Search Hash Variable No Record Found Value

Download Demo App