|Applies to Infiniti v8.5 or later
Infiniti allows creation of nested actions which can reference the output value of the parent action. A nested action can reference that newly created ID and run another action. An action can only be the child of another action if the parent is a repeater.
The following example shows how to create a simple save to disk action nested with an email action. The goal is to save files to different disk locations and nesting an email action to it which sends email notifications containing the location to different users.
1. Create a repeating section ‘File Saver’ with a text field for entering the document save location and a multiple choice for deciding whether to send email notification or not
2. Create a repeating section ‘Email Sender’ (which appears based on the selection for the multiple choice question) within the repeating section ‘File Saver’ with a text field for entering the email addresses of the receivers
3. Add a ‘Save to Disk’ action and set the following properties
NOTE: When adding a nested action, the parent action needs to be a valid repeating action
4. Drag and drop a new action to the parent action, set it as ‘Send Email’ and click OK
5. Click YES on the opened dialog box
The ‘Send Email’ action will be nested on the ‘Save to Disk’ action as per the following image
6. Set the following properties for the ‘Send Email’ action
7. Set the condition for which the nested action should be activated and save the project
Here, the condition will be set in a way that the email will be send only if the document is properly saved in the specified location
1. Open the project and enter the values.
2. Click Next and then Generate Document.
The results will be the following
a. The folders Nested Action Test 1, Nested Action Test 2 and Nested Action Test 3 will be created if it’s not already present in the ‘C:\_temp’ folder and the generated documents will be saved in the 3 folders
b. If the folders are created and documents are saved in their respective locations, then emails containing the file locations will be send to the respective email addresses mentioned in the respective folder sections
nested actions output value parent