Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow Variable not populating

David Trotta
Tera Contributor

I am trying to build a continuous list (string) inside of a loop in Flow Designer.  I created 2 flow variables (one for a singular failure and one for plural failures) to track the failures and add them to the Description field of the catalog task that's created for the failures.

 

I set the singular Failed AD Group flow variable early in my flow (see below):

 

DavidTrotta_0-1723484479683.png

Then I attempt to capture multiple failures using the plural flow variable (see below):

 

DavidTrotta_1-1723484628130.png

 

The singular flow variable works fine, but the plural flow variable does not.  Here is the scripting I used to build the plural flow variable.  Does the scripting look accurate?  Am I missing something obvious?

 

fd_data.flow_var.failed_ad_groups=fd_data.flow_var.failed_ad_groups + fd_data.flow_var.failed_ad_group + ',';

1 ACCEPTED SOLUTION

Anirudh Pathak
Mega Sage

Hi @David Trotta ,

I think the problem is you are not returning the value. Please update your script as below -

var adGroups = fd_data.flow_var.failed_ad_groups + fd_data.flow_var.failed_ad_group + ',';
return adGroups;

 

View solution in original post

2 REPLIES 2

Anirudh Pathak
Mega Sage

Hi @David Trotta ,

I think the problem is you are not returning the value. Please update your script as below -

var adGroups = fd_data.flow_var.failed_ad_groups + fd_data.flow_var.failed_ad_group + ',';
return adGroups;

 

David Trotta
Tera Contributor

Hi @Anirudh Pathak ,

 

The solution worked!  Thank you so much for responding. (-: