...
Introduction
English |
---|
borderColor | green |
---|
borderWidth | 1 |
---|
titleBGColor | #ddffcc |
---|
borderStyle | solid |
---|
title | Definition |
---|
|
Advanced Form Row Data Binder is an extended version of the default Form Data Binder. It allows you to add in Filter Conditions in a guided and friendly manner. |
Panel |
---|
borderColor | purple |
---|
borderWidth | 1 |
---|
titleBGColor | #ddccff |
---|
borderStyle | solid |
---|
title | New Feature |
---|
|
This feature has been enhanced in Joget Workflow v6 to support join, group and aggregate function. |
Image Removed
Advanced Form Data Binder Properties
Configure Advanced Form Data Binder
Image Added
Figure 1: Configure Figure 1: Advanced Form Data Binder Properties
Name | Description |
---|
Form | Source form to retrieve data from. |
Joins Form Data Table |
Info |
---|
|
This is a new feature in Joget Workflow v6. | Name | Description |
---|
Form Data Table Name | Target table to join with | Field | Target table field to join with | Join Field Id | Parent field Id to join with |
|
Info |
---|
|
In the screenshot example in Figure 1, such configurations can be presented with the following SQL. Code Block |
---|
language | sql |
---|
title | Sample SQL |
---|
| SELECT * FROM "Claim Entry" entry JOIN hr_expense_claim claim ON claim.id = entry.claim |
|
...
Advanced
...
Filter
Image RemovedImage Added
Figure 2: Advanced Form Data Binder Properties - Advanced - > Filter
Name | Description |
---|
Filter Conditions | Filter Conditions Name | Description |
---|
Join Type | | Field | |
|
titleImage RemovedImage Added | Operator | - Equal
- Not Equal
- Greater Than
- Greater Than Or Equal
- Less Than
- Less Than Or Equal
- Like
- Not Like
- In
- Not In
- Is True
- Is False
- Is Null
- Is Not Null
| Value | Filter value |
|
Extra Conditions | Additional condition(s) for filtering the data set. HQL is |
the expected here. Info |
---|
| Start your filter name with e.customProperties. followed by the field id (i.e. |
|
titleImage RemovedImage Added |
Info |
---|
| You may even use an operator such as "LIKE" to narrow down your data set. Image Modified |
Code Block |
---|
| e.customProperties.title = 'Trip' |
|
Hash A hash variable is accepted here. Code Block |
---|
| e.customProperties.submitted_by = '#currentUser.id#' |
Userview Key can be used as part of the condition. Code Block |
---|
| e.customProperties.category_id = '#userviewKey#' |
|
Aggregate Query
...
Image Added
Figure 3: Advanced
...
...
...
Image Added
Figure 4: The configurations shown in Figure 3 will produce the following sample result.
Name | Description |
---|
Group By | Add grouping clause/function to the eventual data set. This can be used together with Aggregate Fields above. In figure 3, the "amount" field will be summed up by "claimant", shown in per record row. |
Aggregate Fields |
Select | This field will be displayed once any number of columns has been added into the Group By field. The select field is to |
aggregatedHaving Conditions | aggregate. - Count
- Count Distinct
- Sum
- Min
- Max
- Avg
In the sample screenshot above, the "amount" field will be put into the "Sum" function, and "Count" will be applied to "title". |
Group By | Add grouping clause/function to the eventual data set. This can be used together with Aggregate Fields above. In the sample screenshot above, the "amount" field will be summed up by "claimant", shown in per record row. |
Having Conditions | This field will be displayed once any number of columns has been added into the Group By field. |
The HAVING clause enables you to specify conditions that filter which group results appear in the final results. The WHERE clause places conditions on the selected columns, whereas the HAVING clause places conditions on groups created by the GROUP BY clause. Read more at http://www.dofactory.com/sql/having |
The configurations shown in Figure 3 will produce the following sample result.
Image Removed
Figure 4: Sample result
Image Removed
Figure 5: Advanced Form Data Binder Properties - Advanced - Expression Columns
...
...
Expression Columns
Image Added
Figure 5: Advanced > Expression Columns
Name | Description |
---|
Expression Columns |
Additional An additional column can be added in this expression columns using Hibernate Query Language (HQL). This is especially useful when you need to perform additional computation on multiple columns. Example 1 - Cast column to data type "long". |
Sample Code Block |
---|
SUBSTRING(CAST(dateCreated as string),1,10) // To extract the date from the datetime database column |
|
Sample | CAST(e.customProperties.sales_price AS long) - CAST(e.customProperties.price AS long) |
Example 2 - Concatenate multiple columns into one. Code Block |
---|
| CONCAT(first_name, ' ', last_name) |
|
| first_name ||' '|| last_name |
|
Custom Checkbox/Radio Button Value | Define custom record ID to be used to pass over to column action. Defaulted to ID. Image Modified |