Flow Designer For Each loop using GlideAggregate issues

Erik Gunther2
Kilo Guru

I built a workflow using Flow Designer. I ran into an issue when I implemented a For Each loop on an object returned by a Script Action. The For Each iterates through the list of records, but I cannot pull any field values from any of the records in the loop. Does For Each only work with GlideRecord? I know GlideAggregate extends GlideRecord, so I'm not sure why this wouldn't work.

This first screenshot shows the version against a GlideAggregate object. Note the "Activity Designs" output data shows "View All", which is circled in red. The second screenshot shows the version against the GlideRecord object. Its "Activity Designs" output data lists the Sys Ids of each returned record.

The second issue is with the "If" statement. The first "Condition" value I believe should show the "Order" field value. I circled the blank value in red. Compare this to the second screenshot to see that the GlideRecord does return a value. 

If anyone has had success with using a GlideAggregate in a For Each block, please let me know. I'm hoping this is my error and not a limitation of the platform.

For Each on GlideAggregate:

find_real_file.png

For Each on GlideRecord:

find_real_file.png

5 REPLIES 5

Yeah, you are right Eric!  it is not accepting  the string array!