Push to array output variable in subflow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 12:45 PM
In Flow designer, I have an output variable that is an array of objects. Within my subflow, I am iterating through a list of records and performing some operations (assembling data, calling a REST API, etc.) There are a handful of results for each given record, so I want to capture all of those results within my array.
My problem is that, while there is a Flow Logic to "Assign Subflow Outputs", it seems to only allow me to set my output array and/or its individual elements. For each of my records, I want to be able to push to the array. Is that possible?
Basically, I want Flow to be doing something like this:
while (gr.next()) {
var result = doThings();
output.my_array.push(result);
}
But it only appears to let me do this:
while (gr.next()) {
var result = doSomething();
output.my_array = result
// or
output.my_array[0] = result;
}
It seems to me, only allowing setting of the array or hardcoded indexes completely defeats the purpose of an array.
- Labels:
-
Scoped App Development
- 3,470 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2025 07:37 AM
I know this thread is from 2.5 years ago, but this is interesting, so hoping that this gets picked-up.
If I run a subflow within a loop, and set the subflow's "Wait for Completion" field to "false", I'm *assuming* that this would force creation of multiple instances of the subflow, since we aren't waiting for completion of the subflow in a previous iteration before starting a new iteration to create the subflow (which produces de facto parallel execution of all subflow instances, here).
If the above is correct, wouldn't each subflow instance have it's own copies of the Output Variables? And if that's the case, how would we get access to the output of each of these individual subflows?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2024 10:24 PM
Hi Brad,
Did you end up finding a solution for this one? I'm trying to achieve the same thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2025 08:42 PM - edited ‎05-28-2025 04:01 PM
Imagine not being able to do this. Goes to show how poor the technical ability of the team deciding these low-code approaches are, that we're all being forced down. Imagine not being able to this, which is a basic coding ability for any experience developer.
The frustration level using this platform today just to do basic stuff, with these "new" approaches, is making me want to leave the product as a whole.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 01:02 PM
Hi,
Look at this video by

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-23-2022 01:04 PM
Hi,
Check this video, it should help clarify how to work with complex objects and Subflows.