focus¶
form
shows a dialog on which the user can make inputs. The values are written to the record or a payload and can be used in further actions. Attributes of the node configuration are written to the record, formField
attributes are written to the payload. Important: "mode": "save"
will only save the current record. If you want to save a child of the current object you are standing on, you have to first create an intermediate record with createForm
and set the "_node": "myChildNode"
attribute.
actionValues | |
---|---|
attributes |
Array of attributes that can be entered. |
mode |
Possible values are: temp or save (default) |
temp |
Write only in the record/payload |
save |
Saves the record |
focusAttribute |
The attribute to be focused when opening the dialog. |
saveButtonText |
Change the default text for the save button |
dirtyCheck |
By default, Insight does not check upon leaving the form if there are unsaved changes. If you want to force Insight to dirty check the form action |
confirmLeave |
If you want to force Insight to always confirm you leaving the form |
temp mode¶
Shows an input dialog and sends the values to a http service
{
"label": "Call API",
"icon": "icon-fire",
"action": "form",
"actionValues": [
{
"_tree": "my-tree",
"mode": "temp",
"attributes": [
{
"name": "DESCRIPTION"
},
{
"label": "Count",
"name": "count",
"type": "Decimal"
}
]
}
],
"then": {
"action": "request",
"request": {
"url": "https://your-api.com/request",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"params": {
"desc": "${DESCRIPTION}",
"count": "${$payload.count}"
}
}
}
}
temp and save mode¶
Create a child with two input dialogs and navigate to the created record
{
"label": "Worklog",
"icon": "icon-plus",
"action": "createForm",
"actionValues": [
{
"_node": "worklog"
}
],
"then": {
"action": "form",
"actionValues": [
{
"mode": "temp",
"attributes": [
{
"name": "DESCRIPTION"
}
],
"dirtyCheck": true
}
],
"then": {
"action": "form",
"actionValues": [
{
"mode": "save",
"attributes": [
{
"name": "DESCRIPTION_LONGDESCRIPTION"
}
],
"confirmLeave": true
}
]
}
}
}