Retrieve User ID in Flow Designer from a user select list variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-15-2024 11:12 AM
We currently have automation set up between our SN instance and Jira which allows us to add users to application access groups once a task is created for our assignment group. In this instance using
var names = fd_data.trigger.current.variables.users.getDisplayValue()//user variable
var just = fd_data.trigger.current.variables.business_justification_program_requirements.getDisplayValue();
var desc = just+"\nUsers: "+names;
return desc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-15-2024 12:49 PM
That is a list collector so it can hold multiple values. What do you want to have happen if there are 3 users? Or is it always just 1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-15-2024 11:19 PM
Hi @trmcclain
I assume that you are trying to fetch the user id's from the list collector variable. You can easily do it using flow designer. Please follow the below steps :
1. Design a flow with trigger as Service Catalog which has your list collector variable.
2. Use Get Catalog Variables action to extract List Collector Variable.
3. Use Custom Action "Get List Collector Items" which you can make by taking reference from the link https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...
4. Use a for each loop on the above action output and inside the for each, make use of lookup record through which will get you the user record. You can dot walk on this to get the user id.
I have attached the update set containing the flow and action for your reference. Please import it on your development instance and give it a try.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.