PAK Commands – Configurable Table
1. Summary
This command lets you configure custom tables using a JSON representation. The user can then extend the table by adding new rows.
Available data types are:
| DataType | Description |
|---|---|
|
|
A normal, one line, text input field. |
|
|
An input field, that only allows numbers (positive and negative) as values. Supplies a button to increase/decrease a number by one. |
|
|
A checkbox input. |
|
|
A button that can be used when offering several mutually exclusive options. Selecting one option in a group automatically deselects any previously chosen option in that same group. |
|
|
A drop down menu, where one of the specified options can be selected. |
2. Examples
Due to simplicity, the descriptiveText input parameter will be left empty for the examples. By default, it is set to „Please fill out the table below to continue.“.
| All example images use the Human Task representation of the Workflow Executor. |
Let’s set up a really simple table with one column to input a name. The tableMapping parameter is required and takes the table definition as a JSON.
[
{
"key": "name",
"header": "Name",
"form": "TextField",
"mandatory": true
}
]
When running the command with this sample input, we get the following output.
The user can now extend the table by providing new rows with hitting the Add Button. After a new row is created, it can also be deleted by clicking on the trash can.
Additionaly a prefilled table can be provided over the tableValue input field. An example for the above mentioned table:
[
{
"name": "Max"
}
]
The prefilled table will look as follows:
Additional table lines can be added as follows:
[
{
"name": "Max"
},
{
"name": "John"
},
{
"name": "Alex"
}
]
Every first level Json Object added represents one line.