Sort the items shown in the left side of Slush bucket by 'Order' field

RamNithinD
Tera Contributor

The current default feature of slush bucket is to show the items in alphabetical order. But we have a requirement to show fields in order by the field called 'Order'. Is there any way to achieve this?

We have created a m2m table for two tables called 'Question' and 'Frequency'. Question has a related list where you can see all the frequencies associated with it(basically the data from m2m). There you have the 'Edit' button, when clicked on, it opens the slush bucket with list of Frequencies on left side. We want to that list to be in a specific order based order field.

This is how looks now(Alphabetical order):

RamNithinD_0-1766057144555.png


We want in this order (this data is from Frequency table list view):

RamNithinD_1-1766057218217.png

 



13 REPLIES 13

Yeah nothing is happening even though I am changing the sort order to a-z/z-a. It I delete using X, it is disappearing,  and no option to add manually.
And yes I have used the correct field, that's why we are able to see the field name in the filter.

You have to click the Run filter button after changing the sort field or order drop-downs.  Are you able to achieve the desired results by changing the sort field to anything else, running it, then changing back to Order?

Hi @Brad Bowman  
Unfortunately, Run filter is also not working 😞
I even tried by adding some condition and Run, it applies the filter condition but not the sort order

RajiniM_0-1766069707101.png

Tried with some other field as well, still no luck

uri.set('sysparm_query', 'ORDERBYtrigger_type');

RajiniM_1-1766069882231.png

 

 

Are the table you created and the UI Action in the same scope?

Yes, both are in same scope. I have also tried with Global scope, both didn't work.
This is the full code in UI action

var uri = action.getGlideURI();
var path = uri.getFileFromPath();
var type = parent.getValue('type');
uri.set('sysparm_m2m_ref', current.getTableName());
uri.set('sysparm_stack', 'no');
uri.set('sysparm_query', 'ORDERBYorder');
if(!gs.nil(type) && type == 'external') {
	uri.set('sysparm_query', 'sys_class_name=customer_contact');
}
action.setRedirectURL(uri.toString('sys_m2m_template.do'));