Get the display value of list collector variable values selected through flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
We are working on a catalog item where we have a list collector variable("additional services") getting from question_choice table . Now we need to get the values selected in the list collector into request description. When we are adding the variable it is populating with sysID's of the values selected. So now how can we get the text values using a flow designer.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Phanideepthi ,
I have tested the below logic in my pdi and its working fine!!
In flow designer you need to write the field level script like below in -
here is the sample logic- (it returns to Description fields)
var members= fd_data._1__get_catalog_variables.group_members; var choices="";
var gr= new GlideRecord('sys_user');
gr.addEncodedQuery('sys_idIN'+members);
gr.query();
while(gr.next()){
choices=choices+" , "+gr.getDisplayValue('name');}
return choices;
If you found my response helpful, please mark it as helpful and accept it as the solution.
Thank you
Nawal Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Nawal Singh ,
Thanks for your reply. If I want to add more details to the description how should I add them? Scripting is flow designer is new to me didnt tried before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Phanideepthi ,
I know scripting is not that much easy but I checked alternative way as well. but in this case your variables providing list of sys_id then we need to build a logic and based on the ids need to fetch the display values... in shared screenshot I explain how we can retrieve the value and set to the specific fields.
Please try once and let me know if you still facing any issue I will assist you further!!
If you found my response helpful, please mark it as helpful and accept it as the solution.
Thank you
Nawal Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can create a flow variable of type string and then use "Set Flow Variables" flow logic to grab the label instead of sysId
Then use this flow variable in your flow
something like this but please enhance
💡 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
