- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 10:04 AM
when any user visit incident list view then the table should sorted based on 'priority' field,
how can we do this. I tried with user preference but its not work.
I want to sort the list view for all user on Incident table based on Priority.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 06:47 PM - edited 05-12-2025 06:49 PM
Hi @KamalpreetS
you can create a query BR
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('ORDERBYpriority'); //from high to low
// current.addEncodedQuery('ORDERBYDESCpriority'); form low to high
})(current, previous);
for low to high comment first line and use 2nd
if it just one module(application module) you can update the module URL parameters (sysparm_query) and append them with ^ORDERBYpriority
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 02:49 PM
Hi @KamalpreetS,
I see there's a few ways noted here, but one way I've tried this so far is by setting the sort order on the module under the "Link Types > Arguments" field, and should allow you to specify the sort order. Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 06:47 PM - edited 05-12-2025 06:49 PM
Hi @KamalpreetS
you can create a query BR
(function executeRule(current, previous /*null when async*/) {
current.addEncodedQuery('ORDERBYpriority'); //from high to low
// current.addEncodedQuery('ORDERBYDESCpriority'); form low to high
})(current, previous);
for low to high comment first line and use 2nd
if it just one module(application module) you can update the module URL parameters (sysparm_query) and append them with ^ORDERBYpriority
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 12:18 AM
@Chaitanya ILCR Thanks, it works for me 🙂