Flow - Setting Subflow Output Value within a Loop

scottcoen
Giga Contributor

Hello,

I have a subflow that contains a Do Until loop, and within that loop a custom action (REST) that has outputs. I want to pass those values out of the subflow but the 'Assign Subflow Outputs' does not appear to be working, no values are being set. If i use that step outside of the loop, the test values i hardcode I do see being set as outputs.  Is there some type of scope restrictions here? Is data generated within actions inside a loop not available outside of it?  I noticed when i tried using the pill selector method of selecting the variables, that when the 'Assign Subflow Output' step is outside of the loop I can see the custom action outputs but they are greyed out.

My basic / generic question is how do I get output data generated from a custom action inside a loop available to other parts of the subflow that reside out of the loop?

 

Any assistance would be much appreciated!

Thanks

Scott

2 REPLIES 2

Nicola Attico
ServiceNow Employee
ServiceNow Employee

Hi @scottcoen I'm having a similar issue. Did you find any solutions?

Nicola Attico
ServiceNow Employee
ServiceNow Employee

Ah, maybe I found a workaround for that. Build everything without the Do Until loop, add the loop, and move your activities within keeping the Assign Subflow Output outside of it