How to pass output of one custom action to another custom action in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 11:08 PM
Hi All,
I am working with custom action in flow designer, i need to pass few values from one custom action to another , how can i do that. eg i have got the ouptputs.returnvalue=sys_id;
now i want to pass this in another action .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 11:21 PM
Hi @Priya75
Go to the “Output” tab of your custom action and add a new output variable. For example, if you want to output sys_id, you can add an output variable named sys_id and set its type to String.
- Name: sys_id
- Type: String
Ensure that your custom action’s script or logic assigns a value to this output variable. For example, if you’re using a script, you might have something like:
output.sys_id = current.sys_id;
When configuring the next action, you can access the output values of the previous custom action.
Click on the “Data Pil” icon or use the Data Picker to select the output variable from the first custom action. This will allow you to use sys_id in subsequent actions
Action 1: Custom Action 1 (outputs sys_id)
Action 2: Custom Action 2 (inputs sys_id from Action 1)
In the Flow Designer:
- Action 1: Configure to output sys_id.
- Action 2: Configure its inputs to receive sys_id from the output of Action 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024 11:42 PM - edited 09-11-2024 11:50 PM
is there any other way to get the value in 2nd action, as i am also getting the trigger record( object) in the data pil of second action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2024
11:32 PM
- last edited on
02-18-2025
10:40 AM
by
Steph Morillo
When you create a custom action, it's important to be aware that each single step has inputs and outputs, and the action itself has the same. At the bottom of each step, you define all the required output variables of that step. As you already wrote, you can then assign values to the variables that you previously defined.
In the next step, you define inputs again, and there you can access the outputs of the previous one:
I tried to visualize the data flow with red arrows. Step 1 has an output, and I use it as a source for my input example in Step 2. There I assign the example output. The action itself has an output again, and that is defined in the "Outputs" section.
If you're new to the topic, I can recommend the course on Now Learning. As a reward, you can even get a shiny Micro Certification.