createMulti¶
The action createMulti can be used to create multiple data records. The basic data records are selected beforehand and converted into new ones. The new data records can be adjusted before saving.
actionValues | |
---|---|
_node |
Node name to create |
listEdit |
(optional) Overwrites the listEdit configuration of the child node |
createCount |
(optional) Create several new data records from a selected data record. |
{
"label": "Planned Tool",
"action": "select",
"icon": "icon-cart-add",
"on": ["top"], //It can be used optionally, but then the menu must be defined on the child node. (tooltrans)
"actionValues": [
{
"tree": "wo-quickrep",
"node": "wptool",
"attribute": "ITEMNUM",
"multi": true,
"filter": {
"WONUM": "${WONUM}"
}
}
],
"then": {
"action": "createMulti",
"actionValues": [
{
"_node": "tooltrans",
"listEdit": {
//It can be used optionally, it overwrites the listEdit configuration of the child node.
"attributes": [
{
"name": "TOOLQTY"
},
{
"name": "TOOLHRS"
},
{
"name": "ROTASSETNUM"
},
{
"name": "ROTATING_FORM"
}
]
},
"createCount": {
//It can optionally be used to create several new data records from a selected data record.
"count": "${$payload.each.properties.ITEMQTY}",
"enabled": "${$payload.each.properties.item/ROTATING}",
"values": {
"TOOLQTY": 1
}
},
"ENTERBY": "${userData.login}",
"ITEMNUM": "${$payload.each.properties.ITEMNUM}",
"TOOLQTY": "${$payload.each.properties.ITEMQTY}",
"TOOLHRS": "${$payload.each.properties.HOURS}",
"REFWO": "${$payload.each.properties.WONUM}",
"SITEID": "${$payload.each.properties.SITEID}",
"ROTATING_FORM": "${$payload.each.properties.item/ROTATING}"
}
]
}
}