Sort the items shown in the left side of Slush bucket by 'Order' field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
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):
We want in this order (this data is from Frequency table list view):
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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
Tried with some other field as well, still no luck
uri.set('sysparm_query', 'ORDERBYtrigger_type');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Are the table you created and the UI Action in the same scope?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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'));