how to convert array of objects to Reference in flow designer?

John_123_Snow
Mega Expert

I have a following Script Step where I am getting Approval group's sys_ids (ie. 3 sys_ids) 

find_real_file.png

 

After this I would like to use this approvalGroup object where the sys_id's are store in Ask for Approval Action....but it takes only reference fields, so drag and drop does not work? How can I achieve this so I can store this for Output.

 

otputs.approvergroups = approverGroups; returns

{approverGroup: 'sysID1'},{approverGroup: 'sysID2'},{approverGroup: 'sysID3'},

9 REPLIES 9

Hi,

you are looking up groups table based on what value?

you can directly set the approval from the script section besides f(x)

Regards
Ankur

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

I am looking it up by the array of objects that have stored, the sys_ids, you can see it on the top, Look up Group Records where sys_id is one of ... 2 sys_ids in my case or more...

if i access it in the script, how can i access the array of objects and the sys_ids that are defined there? 

This is what I get when I log "3.1 Group Records" - sys_ids are correct

This is what I get when I log "3.1 Group Records" - sys_ids are correct

and then for example the log for approval...