Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Get the display value of list collector variable values selected through flow designer

Phanideepthi
Tera Contributor

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. 

Phanideepthi_0-1763388943210.png

 

 

Thanks in advance.

1 REPLY 1

Nawal Singh
Tera Guru

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 - 

NawalSingh_1-1763391178185.png

 

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