Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Orderable glide_list slushbucket?

Stu Gebhardt
Tera Contributor

I need to select several records in a glide_list field.  However, I also need to have them in the list in a specific order, as they are are references to pdf sys_attachment records that will be merged into a single pdf by an external integration.  How can I add the ability to order the selection in the glide_list?  I ultimately need something like the sys_choice slushbucket that has up/down buttons to reorder the choices.  Does anyone know how to do this?

4 REPLIES 4

Slava Savitsky
Giga Sage

Unfortunately, there is no such functionality in the base system. The source code of the slushbucket is also not available for customization. You could probably insert those buttons into the DOM from a client script, but that is not a good practice.

Its_Azar
Mega Sage

Hi there @Stu Gebhardt 

 

similar to the sys_choice slushbucket with up/down buttons, you would need to customize the UI. Unfortunately, out-of-the-box glide_list fields do not support reordering. One approach is to use a related list with an order field. Create a new table to store the references and include an order column. Then, create a related list on your form that references this new table. Add UI actions for up and down to adjust the order values. This way, you can reorder the items as needed before sending them to the external integration.

 

if this helps kindly accept the response thanks much,

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.

When I first read the question, I got an impression that the author was talking about a list collector variable in a catalog item, but now I am not so sure anymore.

VictorTheGeek
Tera Contributor

Has anyone figured out how to sort a glide_list slushbucket?

I have a List type column called Suffix (u_suffix) in my custom table (TableA) that references another table (TableB). I already have a column in TableB called Sequence (u_sequence) so that I can manually set the sort order.

 

1) When I'm on my Workspace TableA form, I click into the list field and a searchable dropdown field appears. How do I sort that dropdown?

 

2) When I'm not in my Workspace and go directly to my list, then click to edit a row, the Suffix field has a lock symbol. I click it to unlock the field and see this:

VictorTheGeek_0-1775757897231.png

When I click the "Add/Remove multiple" button, a modal opens with a slushbucket. How do I sort the left side of the slushbucket?

VictorTheGeek_1-1775758140421.png