select (web)¶
An action to select one or multiple objects from a tree with root-nodes. The initial list can be filtered. By default, multi records can be selected, single selection must be enabled.
The selected elements can be forwarded to the next action via then
. They are accesible in $payload
with the key selections
or by the one specified with payloadKey
. The result is an array of JSON-objects.
actionValues | |
---|---|
tree |
source tree for getting (root-)nodes |
payloadKey |
key the selections are stored for further processing |
filter |
attribute/value object to pre-filter (root-)nodes |
Basic Example¶
{
"label": "Add Roles",
"action": "select",
"icon": "icon-select",
"actionValues": [
{
"tree": "usergroup"
}
],
"then": {
"action": "request",
"request": {
"method": "POST",
"url": "insight/action/insight-suite/roles",
"params": {
"roles": "${$payload.selections}",
"login": "${userData.login}"
}
}
}
}
Single selection¶
{
"label": "Add Roles",
"action": "select",
"icon": "icon-select",
"actionValues": [
{
"tree": "usergroup",
"multi": false
}
]
}
With Filter¶
{
"label": "Zu AS zuordnen",
"action": "select",
"icon": "icon-select",
"actionValues": [
{
"tree": "as-select",
"filter": {
"measureId": "${$context.$record.properties.id}"
}
}
],
"then": {
"action": "request",
"request": {
"method": "POST",
"url": "insight/action/business-suite/as/link",
"params": {
"arbeitsscheine": "${$payload.selections}",
"activityId": "${$context.$record.properties.id}"
}
}
}
}
With payloadKey¶
{
"label": "Add Roles",
"action": "select",
"icon": "icon-select",
"actionValues": [
{
"payloadKey": "roles",
"tree": "usergroup"
}
],
"then": {
"action": "request",
"request": {
"method": "POST",
"url": "insight/action/insight-suite/roles/add",
"params": {
"roles": "${$payload.roles}",
"login": "${userData.login}"
}
}
}
}