JimS
February 10, 2024, 5:45pm
1
Hi, @sylumer . I recently shared an action in the Drafts Directory , Add Lines to List ; in the corresponding Draft Community thread you made the following comment…
Consider having an action X (this list action) that will use its own defaults unless others have been specified.
Then, create other actions (A, B, C) that each contain their own set of override defaults and that then includes action X.
This will mean that if action X is updated you do not need to duplicate it and build A, B, and C each time.
Action X should just require some tweaks to accommodate this.
That sounds like a great idea. Might you be able to point me to an example or two.
Thanks in advance!
You are looking for the Include Action step. It merges the steps from another action into the current one and runs them as if they were defined there.
1 Like
sylumer
February 10, 2024, 7:45pm
3
Here’s a worked example
Run this to see an alert.
Run this to give a different message in the alert, but still using the action above to deliver the alert; setting via JavaScript variables.
2 Likes
JimS
February 10, 2024, 8:29pm
4
sylumer:
Here’s a worked example
Thanks, @sylumer and @agiletortoise .
Am I correct in assuming the calling action looses association with the master action when uploaded to the Drafts Directory ? That is, it appears that after the download, one needs to open the caller , move the the Include Action step and reselect the master action. Do I have that right?
sylumer
February 10, 2024, 8:53pm
5
Try redownloading the second action with the include.
I think it was I just needed to enter the name in the template rather than the selection option.
Not the first time I’ve done that and shared an action, anf I dare say it won’t be the last
1 Like
JimS
February 11, 2024, 2:53am
6
Thanks, @sylumer . I downloaded the second action again and I see the change you made.
Is that something you learned by trial-and-error? I don’t see that distinction in the documentation: Action Step: Include Action