How to show customized ordered records in List view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2025 10:26 PM - edited 06-29-2025 11:03 PM
Hi everyone,
I have a custom table with the following fields: Category(Choice field with options: Application, General, Network, Software, Password), Order(String), and Inactive(Checkbox).
I'm trying to achieve the following:
- Display all records where Category= General at the top.
- After that, show records from other Category.
- Within each Category, the Order field should be sorted alphabetically (A to Z) and Inactive is false.
Has anyone implemented a similar sorting logic or have suggestions on how to achieve this in a list view or through scripting?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 12:47 AM - edited 06-30-2025 12:52 AM
&sysparm_order=u_application,u_order&sysparm_order_direction=asc is not working and ordering not coming in AtoZ sorting
And u_application(category) sorting as alphabets not values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 01:01 AM - edited 06-30-2025 01:04 AM
Remove the query and also remove order as well as below
System auto sort
Below is another example
Here I am trying to set Ab option to top so I set it to 0 and remaining to 1
Here is the results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 02:31 AM
It is working now but how can I set sort(AtoZ) for other fields.
General is coming at the Top as I gave sequence as 0 and also there are two more field which needs to be sorted. Those are Sequence No1 and Sequence No2, these are string fields. the values will be 1-5.
So I needed general re cords should come at top and within the general records then next sort should Sequence No1 and then Sequence No2
This sorting should show in the list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 02:44 AM - edited 06-30-2025 02:50 AM
for other fields, if you need to sort then set its order to 1, 2 and so on.
Example if you need General at top then give lowest number to it, which is 0
then if you need application to 2nd top, then set it to 1
if you need Network to 3rd, then set it to 2.
Remember, which ever order you put, system take it from lower to higher number, if no order field set to any of the option then it will auto sort based on alphabetical order.
If both option have same oder like B and D then it will display in alphabetical order
If my response helped please mark it correct and close the thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 02:53 AM
For Category I've given the values from 0 and It's working but I need two more sortings on the same list.
1) General category records should be Top(Working)
2) After the sorting on the category, I need two more sorting on Sequence No1 and Sequence No2
3) Example how I wanted to show - 1st record: Category - General, Sequence No1 - '1' and Sequence No2 - '2'
4) Only Inactive false records should showns