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.

how to print array output in flow designer > action

skumar_srbh
Tera Guru

I have created an Action, where I am trying to fetch the Incident's assignment group members email ID, 

skumar_srbh_0-1690349593725.png

incident number is the input and in script section i am fetching the value from sys_user_grmember table. in the end of script part, I have added a log to print- "output.user_emailID", and can see email ID values are populating. however when i see the execution of Action, its shows blank.

skumar_srbh_3-1690350664581.png

 

My question is, in the above screenshot, are all email IDs from group should show in front of User Ids field ?? as Further I am using this action into a for each loop in a flow, it's not working.

 

Thanks in advance for help,

Kumar

1 ACCEPTED SOLUTION
7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@skumar_srbh 

you should have return type of array/object.

Did you check that?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Now i tried Array.object, but still same issue. 

 

skumar_srbh_0-1690358844074.png

 

skumar_srbh_1-1690359037272.pngskumar_srbh_2-1690359074861.png

 

Thanks,

Kumar

Shruti
Mega Sage
Mega Sage

Try to query sys_user_grmember table it will list all users of that group and you can get the email ids

no issue here. I am using "sys_user_grmember" only, it was a typo, my bad.