How to use Custom JavaScript within a Workflow Subaction
Custom JavaScript is able to be applied to Subactions within the Work Flow. This is useful for applying custom functionality to a value based on the action performed.
Instructions
- Select the Module link in the top left banner, from the Module list select the module for which the field is being Mobile Link enabled.
- Select the Wofkflows tab within the Module settings, then select the Actions tab.
- Select the action for which the Custom JavaScript Subaction is to be added, then the Subactions tab.
- After defining the condition for the Subaction, select the field for assignment from the left.
- On the right side of the assignment statement to execute Custom JavaScript the text but me wrapped by '{' an opening and closing brace '}'
(Note: Variable references can be used within these braces in a similar fashion to other Custom JavaScript (Example - "%(customString1)%"))
If the goal were to increment a value already in a field each time an action was performed the code below would achieve this.
Related articles