Assign subflow outputs flow logic
- UpdatedAug 1, 2024
- 2 minutes to read
- Xanadu
- Create Workflows
Specify the data the subflow returns when it completes running. Use subflow output as data for a parent flow or as input for another process.
Inputs
| Field | Description |
|---|---|
| Name | Name of the output. Select from the list of outputs available for the flow. |
| Data | Value for the output. Enter a string value, input a script, or use a data pill. Output values can reference any data pill from
earlier in the flow, including other outputs. If you set outputs values by reference to
other data pills, you must maintain the order of the output assignments. The referenced
value must always come before the output that uses the referenced value. Changing the
order may produce null values. To assign an empty value, leave this field empty. Note: Flow output values are set in the order in which they are
assigned from top to bottom. If you set the value of the same output multiple times, the
flow only uses the last value set. |
Outputs
This flow logic produces no outputs of its own, but it does set values in the Subflow Outputs section of the Data pane.
Example: Set the output code of a Delete Record action
In this example, the flow uses the Sys ID of a dashboard to look up a record, delete the record, and then return the action status code of the delete operation. The subflow assigns the output value of the Output code flow variable.
Design considerations
Follow these design considerations when assign output values from a subflow.
- Do not assign subflow output values within loops
- Subflow outputs are intended to be static values generated at the completion of the subflow. Loops do not have access to subflow output values while the subflow is running. Assigning subflow output values within a loop can produce unexpected results such as the loop only receiving the last value set. If you need to generate dynamic values that change within a For each or Do until loop, use flow variables instead.
Related Content
- Call a workflow flow logic
Run a published and active workflow from your flow. You can use the flow data as a workflow input. For example, you can specify the current record as a workflow input.
- Do the following until flow logic
Apply one or more actions repeatedly until an end condition is met. You can use the flow data to specify the end conditions.
- Do the following in parallel flow logic
Run actions and subflows in separate paths within an isolated flow logic block.
- Dynamic flows flow logic
Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows.
- End Flow flow logic
Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block.
- Exit Loop flow logic
Exit from a flow logic loop when the conditions of an If flow logic are met. Continue running the flow from the next step after the flow logic loop. This flow logic is also known as break.
- For Each flow logic
Apply one or more actions to each record in a list of records.
- Go back to flow logic
Return to a prior step in the flow to repeat a sequence of actions.
- If flow logic
Selectively apply one or more actions only when a list of conditions is met.
- Make a decision flow logic
You can use the decision table branching logic in situations where multiple conditional paths are required, as an alternative to nested If, Else If, or Else flow logic. For example, if you want to determine what kind of car insurance you need, you can add inputs such as your age, accident history, and car model to the decision table to determine a level of insurance coverage. This logic can save you time and present a more readable format than nested if conditions or switch case statements.
- Set Flow Variables flow logic
Assign a value to one or more flow variables, which store flow data as data pills. Access flow variable values by referring to their data pill.
- Skip Iteration flow logic
Skip the current iteration of a flow logic loop when the conditions of an If flow logic are met. Continue running the flow logic loop with the next item in the list. This flow logic is also known as continue.
- Try flow logic
Allow a flow to continue running when an error occurs within a flow logic block. Run a sequence of actions in response to errors within the flow logic block.
- Wait for a duration flow logic
Use this flow logic to give your users time to act during automated processes or to wait for a specific date and time to complete actions.