top of page

Experiencing challenges with ServiceNow support?

IKC provides professional, reliable assistance that covers gaps not supported by ServiceNow

and without the high costs of traditional services.

 

Starting from just $1,000

How to Set the Default Sorting Order for a Simple List Widget in ServiceNow Service Portal

Updated: Apr 1

ServiceNow’s Simple List widget is a base system widget used to display lists of records from a specified table on a Service Portal page. It allows you to show a list of items (like Incidents, Change Requests, etc.) in the portal without writing custom code. By default, however, the Simple List widget may not sort records in the most useful order for end users. For example, users often want to see the latest requests or tickets first, but out-of-the-box the Simple List doesn’t let you specify a sort order through the normal filter builder.


Sorting data by a specific field (such as creation date or priority) is important for usability and efficiency – it ensures that users see the most relevant or newest information at a glance, rather than having to search through an unsorted list.


In this article, we’ll explain the challenge with the default Simple List widget’s sorting and walk you through how to set a default sort order (e.g. by creation date) for the Simple List in ServiceNow’s Service Portal. We’ll provide step-by-step instructions to configure the widget instance, address common issues like missing fields on the form, and mention alternative approaches (like using filter query strings with ORDERBY directives). By the end, you’ll be able to customize the Simple List widget to sort records in a way that makes sense for your users, without cloning the widget or writing custom code.


The Challenge: No Default Sort Option in the Simple List Widget


The Simple List widget is usually configured by selecting a table and filter conditions (for example, "Incidents where Assigned to is Me") to display a list of records. This is often done through the Service Portal’s widget instance options or the filter builder. The problem is that the default Simple List widget does not provide a built-in option to sort the results in the filter builder or instance options UI. As one user pointed out, “There is no Sort option in the filter builder in the instance settings” of the Simple List widget.


This means all records are shown in the default order (which might be unsorted or based on the system’s default sorting sequence, not necessarily by date or any logical field from a user perspective).


For example, if you want a list of tickets sorted by newest first, the Simple List’s default configuration doesn’t allow you to specify “Order by Created date descending” through the normal interface. Many administrators initially consider cloning the widget and adding a sort parameter to its Option Schema or script, but that approach is more complex and harder to maintain.


Fortunately, there is an easier way to set a default sort order without cloning the widget.


Solution: Configure Default Sorting via the Widget Instance Form


The Simple List widget’s instance record has hidden fields for sorting that you can leverage. Specifically, each Simple List instance (stored in the Instance of Simple List table, sp_instance_vlist) includes an Order by field and an Order direction field. By exposing and using these fields on the widget instance form, you can define how the list should be sorted by default. In essence, you will open the widget’s instance record in the platform UI, add the sorting fields to the form (if they aren’t already visible), and then set your desired sort field and direction. This approach uses ServiceNow’s built-in functionality and avoids any need to modify the widget’s code.


Steps to set a default sort order on a Simple List widget:


  1. Open the Simple List widget instance record. In the main ServiceNow interface (not the Service Portal), navigate to the record that represents your Simple List widget instance. The Simple List instances are stored in the table Instance of Simple List (sp_instance_vlist). You can find it by going to Service Portal > Widget Instances and filtering for your widget, or by using the filter navigator to search for “Instance of Simple List”. If you know the page where the widget lives, you can also use Ctrl + Right-click on the widget in the Service Portal and choose Instance Options, then use the menu to Open in Platform (this will open the instance record in the platform UI). Once you have the instance record open, you should see the configuration fields (like Title, Table, Filter, etc.) for that widget instance.


  2. Add the "Order by" and "Order direction" fields to the form (if missing). By default, the form layout for Simple List widget instances might not show the sorting fields. If you do not see an Order by field on the form, click the Additional actions menu (the hamburger menu ☰ on the form header) and choose Configure > Form Layout. In the form layout configuration, move the Order by and Order direction fields from the Available list to the form layout (e.g., to the Fields section on the form) and save the form layout. This will make those fields visible on the instance form. (Note: The Order by field allows you to choose a field from the target table to sort on, and the Order direction field lets you specify ascending or descending order.)


  3. Set the sorting fields to your desired values. After adding them, fill in the sorting options on the widget instance form. Click into Order by and select the field by which you want to sort the list (for example, Created to sort by the creation date of the records). Then set the Order direction – choose Descending if you want the newest records first (or highest priority first, etc.), or Ascending for the opposite order. For instance, to sort by creation date (with newest on top), set Order by = Created and Order direction = Descending. This combination will ensure the list loads with the most recently created items at the top. If you wanted oldest first, you would choose Ascending, and similarly you could sort by other fields like Priority or Number depending on your use case.


  4. Save the widget instance record. Click Update to save the changes to the instance record. Now navigate back to the Service Portal page (or refresh it) and verify that the Simple List widget is displaying items in the specified sorted order. You should see that the records are now ordered according to the field and direction you set. For example, incidents or requests will appear with the latest one first if you sorted by Created date in descending order.


After adding the Order by and Order direction fields to the widget instance form, you can configure them to define the default sorting. In this example, the Simple List instance (titled "My Incidents") is set to Order by = Created and Order direction = Descending, so it will display Incident records sorted by creation date (newest first). The Table is set to Incident, and the Filter conditions would determine which incidents are shown (e.g., those opened by the current user). By using these instance options, the widget will always show the list in the desired order without any code changes.


Troubleshooting Tip: If you cannot find the Order by or Order direction fields, double-check that you opened the correct instance record (the class should be Instance of Simple List on the form header or sys_class_name). Ensure you have the right permissions (admin or delegated developer) to configure the form. Remember to use Configure > Form Layout on the instance form to add these fields if they’re not visible. Once added, they remain available for that form going forward. Also, if the list still isn’t sorting as expected after setting these fields, verify that you chose a valid field name in Order by (it should match a column on the target table) and that you selected the correct direction (ascending vs descending).


Alternative Approach: Using Filter Query (ORDERBY) in Instance Settings


Aside from using the instance form fields, another way to set a default sort is by incorporating the sort order into the filter query itself. ServiceNow’s encoded query strings support ORDERBY and ORDERBYDESC directives that can be appended to filter conditions. In the Simple List widget’s instance, there is a Filter field (which holds the conditions for what records to display). You normally build this with the condition builder, but you can also edit it as a text query. By manually adding an order directive to this filter, you achieve the same result as the Order by fields.


For example, if your Simple List is showing records from the Incident table, you could include an order by creation date in the filter like so:

active=true^assigned_to=javascript:gs.getUserID()^ORDERBYDESCsys_created_on

In this encoded query, ORDERBYDESCsys_created_on tells the platform to sort results by the Created on field in descending order (newest first). You could similarly use ^ORDERBYpriority to sort by priority (ascending) or ^ORDERBYDESClast_updated for latest updated first, and so on. This approach might be useful if you prefer to configure everything in one place or via scripting. Keep in mind that the Service Portal’s widget configuration UI may not show the full query with the ORDERBY clauses, so this is a more advanced tweak. In general, using the dedicated Order by and Order direction fields on the instance form is more straightforward and less error-prone, but it’s good to know that the encoded query method exists as an alternative.


Conclusion


Setting the default sorting order for a Simple List widget in ServiceNow’s Service Portal is a simple but impactful customization. By exposing the built-in Order by and Order direction fields on the widget’s instance record and configuring them, you can control how list data is ordered by default – for example, showing the most recently created tickets at the top of the list for better visibility. The key steps are: locating the widget’s instance record, adding the sorting fields via form layout, and setting your desired sort field and direction. This solution leverages ServiceNow’s platform features and avoids more complex workarounds like cloning the widget or writing scripts.


When customizing widgets, it’s best practice to use instance options and configurations provided by the platform (as we did here) before resorting to cloning or heavy scripting. The Simple List widget example shows how a small configuration change can enhance usability. Always test your changes in a sub-production environment to ensure the sort works as expected and doesn’t impact performance.


Finally, remember that ServiceNow’s Service Portal is highly flexible. Beyond the Simple List widget, many other widgets have instance options or support similar tweaks – explore the Widget Options Schema, Portal Designer, and other widgets like the Data Table for additional ways to tailor the portal to your needs. With a good understanding of widget instances and options, you can achieve efficient customizations that improve the user experience without breaking from upgrade-safe practices. Happy customizing!


Experiencing challenges with ServiceNow support?

IKC provides professional, reliable assistance that covers gaps not supported by ServiceNow

and without the high costs of traditional services.

 

Starting from just $1,000

CONTACT

New Zealand HQ

Integrated Knowledge Consulting Office

Level 3, 93 Grafton Road

Auckland

South Korea

Integrated Knowledge Consulting Office

BMY역삼타워 6층

서울특별시 강남구 역삼동 678-10번지

 

info@ikconsulting.com

Thanks for submitting!

  • LinkedIn Social Icon

© Copyright 2025 Integrated Knowledge Consulting. All rights reserved.

bottom of page