I wish an action to add a Service Order with multiple tasks based on their status in a stategroup. Is this possible? What would be a creative solution? The code below is invalid syntax, but gives you an idea of what I am trying to accomplish.
'Create Service Order': action { } => update ^ ^ ^ ^ .'Service Orders' = create (
....
'Tasks' = switch ^ .'Repackaging Needed' (
| 'Yes' => create (
'Task' = "Example 1"
) => switch ^ ^ ^ .'Type' (
| 'Internal' => ignore
| 'Sale' as $ => create (
'Task' = "Example 2"
)
)
| 'No' => switch ^ ^ ^ .'Type' (
| 'Internal' => ignore
| 'Sale' as $ => create (
'Task' = "Example 2"
)
)
)