Home > Forum > Actions > Execute Action (or Automation) from Item List row

Execute Action (or Automation) from Item List row
0

MVP

Hello everyone!

I have an item list with a dropdown field where user chooses a WFD_ID value. I would like to execute an action (Update related workflow instance or Invoke REST web service) passing the WFD_ID chosen in the mentioned field to the action. Is something like that even possible? I can't find a solution myself.

Thank you,
M.

MVP

Haven't tried it but i'm thinking about:
1. On change of a dropdown - set technical column on that row to TRUE.
2. Using form rules (on the same change event) - execute global action (it's possible with JavaScript see screenshot). If it shouldn't run on change, then add some button to trigger it.
3. Action which will run should filter by the element id, conf id, and that technical column.
4. Clear the technical column (not sure if it'll be possible with form rule, or it will require some sql update).

Not exactly passing WFD_ID, but result should be similar.

MVP
In reply to: Maksymilian Stachowiak

Haven't tried it but i'm thinking about:
1. On change of a dropdown - set technical column on that row to TRUE.
2. Using form rules (on the same change event) - execute global action (it's possible with JavaScript see screenshot). If it shouldn't run on change, then add some button to trigger it.
3. Action which will run should filter by the element id, conf id, and that technical column.
4. Clear the technical column (not sure if it'll be possible with form rule, or it will require some sql update).

Not exactly passing WFD_ID, but result should be similar.

Hi Martin,

Maksymilians answer will work. We did something similar in the past but with a "normal" field not from an item list. Since the global action or path transition you are calling will generate a new version/execute actions you can clear the technical field in it.

I'm wondering though, whether the action should be executed immediately be executed or if the user selects selects the "target instance" for multiple rows.
If this is the case I would probably just add a technical column to the item list, which is set when the workflow is selected. Instead of a technical column it could also be a choose field called "Actions", which tells the user, that the target will be updated. After executing it, you can set it to "Target updated" and the user would see that everything is fine.
At least this would be feasible in a version whit automations which have the "for each" operator and can execute actions on item list rows.


Best regards,
Daniel