- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 06:37 AM
Good Day everyone,
i have this list collector in my Service Catalog that will ask users to enter in User names on it.
From this i would like to have my flow designer to collect these people and for each person create a catalog task and assign it to those people
so far i have this and is not working
i am getting the catalog variable from the form and then looking up the record on the user table
but in the for each item it only allows me to select the Get Catalog Variable and not the look up variable
When i test it, the For Each Item shows 0 records.
what can i do?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 07:11 AM
Per SN, you'll need to "create a custom action that uses a string as the input, parse the string into an array, then outputs the array to be used in the For Loop. "
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0793340
Here's an example on how to do that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 06:58 AM
You can try with below steps.
- Use Get Catalog Variables Action to get list collector values.
- Use Lookup Records Action on sys_user table to get an array object of users.
- Use For Each Flow Logic to loop through array object.
- Use Create Catalog Task to create a task for each user record found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 07:14 AM
i did that in my screen shot however its not working
i am not able to use the array object for the for each in the flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 07:20 AM - edited 10-12-2022 07:22 AM
Looks like you are using Look Up Record rather than Look Up Records (this will return an array of records).
So, either use Look Up Records or if you do not want to use it then try to utilize sys_ids from your list collector to create tasks directly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2023 04:07 PM
That worked for me for a similar challenge I had. Thank you