How to update a glide_list field with multiple users from Look Up Records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
14 hours ago
Hello Community
I’m trying to build a Flow like this:
Look Up Records from table TableA
Get all values from the reference field FieldA (which refers to sys_user) in those records
Update a record in user_criteria, setting the User field (glide_list) with all those users
I created a custom Action between the Look Up step and the Update step.
However, Flow Designer doesn’t allow me to pass the Look Up Records “records” array into an Action input of type Array.Object.
If I change the input type to String, I can pass multiple sys_ids as text, but I’m not sure how to handle this correctly.
I want to update the User field with all users from the Look Up Records result.
What’s the best or simplest way to do this in Flow Designer?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
custom Action returned a comma-separated string of sys_user sys_ids.
I want to update the User field (glide_list) in the user_criteria table with this string, but it doesn’t work.
How can I correctly update a glide_list field from a Flow Action output (string)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
the flow is unable to determine the GlideRecord and hence the error.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
you need to create Input of type Records.User
then it will allow you to pass input
1 question -> why you need Custom Action when you can directly use Lookup on User criteria record and update the user list field with FieldA value as you already have the values.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
Hi @E555,
To address your requirement, follow these steps in flow designer for a smooth implementation:
Create a Flow Variable:
Create a Flow variable, say "Criteria Users" and set its type to String. This will store the list of user IDs you intend to update in the User Criteria record.
Look Up Records Action:
Add a Look Up Records action for Table A (e.g., Incident). Apply a condition to filter records where Field A (e.g., Resolved by) is not empty.
Set Flow Variable using Script:
After the Look Up Records action, add a Set Flow Variable flow logic to populate the "Criteria Users" variable with the user IDs. Use the following script in the flow logic:
var userList = "";
var records = fd_data._1__look_up_records.records; // Adjust this for the correct Look Up Records result reference
while (records.next()) {
if (records.resolved_by && !userList.includes(records.resolved_by)) {
userList += records.resolved_by + ",";
}
}
return userList;This script loops through the resolved_by field in the records returned by the Look Up action, checking for unique users, and concatenates their sys_ids into a string (separated by commas).Update Record Action:
Add an Update Record action to update the User Criteria table.
In the Fields section, set the Users field (which is of type glide_list) to the flow variable "Criteria Users". This field will now be populated with the list of user sys_ids.
Here is the successful execution:
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.