Order by 2 fields in URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2015 02:40 PM
I came across this article and have used this functionality in the past to get a list to be ordered in a default way which I specify:
The example gives you a way to order by 2 fields using the encoded query, but how would I do this for the first example where I want to append 2 order by specifications in the URL arguments ?
Example of one order by with one order direction:
&sysparm_order=sys_created_on&sysparm_order_direction=desc
* Note: This will probably also mean specifying 2 order directions. This may or may not be possible... anyone have an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2015 03:36 PM
Hello Daniel,
Please refer to section number 3 in this link:
Controlling the Sort Sequence Used to Display Lists - ServiceNow Wiki
You can do something like this in your URL:
sysparm_query=^ORDERBYfield1ORDERBYfield2
User orderbydesc when sorting by descending order.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2015 08:59 AM
Okay, I will test that out and get back to this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2015 12:20 PM
Section 3 says to put that in the Arguments field - and there doesn't seem to be an arguments field in my instance. I've looked under configure form layout as well and cannot find one. Can you clarify what is meant? Thanks in advance.