- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 06:58 AM
Hello,
- I have flow.
- Look up records
- For Each Item In
- where I need create one array with all data found
- Such array needs to be passed out of For Each Item In. I try to handle it via FLOW Variable right after for each....
Any advice?
I was able to achieve this but getting always one blank value, dont know why.
Any better way to create comma separate list of data after For Each Accesible later on out of that branch?
/Petr
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 10:19 AM
Hi @PetrP
I believe there is some empty value is getting passed into the array. Write a query to ignore the empty values before pushing into the array. If you stuck please post the code here, I will try to help you out.
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 10:19 AM
Hi @PetrP
I believe there is some empty value is getting passed into the array. Write a query to ignore the empty values before pushing into the array. If you stuck please post the code here, I will try to help you out.
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 09:33 PM
Thank you, not sure if I should implement it different but this is what I have now. No Code used yet in flow.
Please review below, any idea how to solve this or implement different?
Goal is to create array from look up records and have that array available o level 1 in flow as below number 5.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 08:04 AM
Hi,
I see you have scripted it, but maybe you are interested in the explanation.
On the first iteration you have the loop variable and you add "," and the flow variable that at this point is empty.
So what happens is you got an extra comma at the end, witch gives you the empty element.
What I did in a similar case is an additional assign step like this (see blue fx with Replace String)
a regex to replace the last ","
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 11:35 PM
At the end I scripted this in flow action where I create array, gliderecord query to get all data and push array.