how to convert array of objects to Reference in flow designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 04:43 AM
I have a following Script Step where I am getting Approval group's sys_ids (ie. 3 sys_ids)
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'},
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 07:07 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 07:17 AM
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 07:19 AM
if i access it in the script, how can i access the array of objects and the sys_ids that are defined there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 07:22 AM
This is what I get when I log "3.1 Group Records" - sys_ids are correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020 07:23 AM