Suggestion to introduce one of the field as "Lookup List Collector"

PrajotA
Tera Contributor

Hi Team,

There is one requirement where multiple options to be selected which is referencing to Core Company table, where only company code should be populated in the drop down list. But using List Collector the default field is displayed as Company Name. Kindly Help.

Thank you in Advance!

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@PrajotA 

please use list collector and you can use ref_ac_columns to show the company code as well when user types in

ref_ac_columns=codeField

I did for server table as example below

you need to give the ref_ac_columns attributes for that and give the additional fields

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=category;serial_number,ref_ac_columns_search=true,ref_ac_order_by=name

Variable attributes sections

AnkurBawiskar_0-1745464361209.png

 

Output: I have added category and serial_number as extra fields to be shown along with name

AnkurBawiskar_2-1745464393463.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

PrajotA
Tera Contributor

Hi Ankur,

Thank you for your response.

But in my case I want all the company codes selected in the form  separated with "|" and the same to be stored in one of the field.

Thanks 

@PrajotA 

I believe I answered your original question

What's your exact question?

You want user to select multiple companies and then want to store the company codes for it separated by |?

If yes then you can keep list collector referring to core_company table

Then write onChange catalog client script and use GlideAjax and populate the codes separated by |

I hope you will be able to achieve it.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@PrajotA 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader