- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 01:04 AM
Hi All,
I have a variable of reference field type with simple condition in it.
I need to sort the results by a column in descending order.
I used variable attributes section where ref_ac_order_by=columnname.
This is doing ascending order sorting.
How to do it descending order sorting by a column name?
I have referred many community links and also got to know , have to write query business rule. But I am not happy with that.
Kindly advise using variable attributes sorting by descending or a better way.
Thanks,
Ram Prakash K R
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2020 04:39 AM
Can you try like this
var encodedquery = "sys_created_on>=2020-12-14^sys_created_on<=2020-12-15 23:59:59";
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 10:28 PM
Hi,
Try setting Isolate Script field for your client script as False
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 10:32 PM
Hi Ankur,
I did it but the result is "no matches found".
Kindly advise.
Thanks,
Ram Prakash K R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 11:35 PM
Hi,
Not sure from the client script approach.
will have to check
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 11:46 PM
Hi,
I just tried from the client script which is shared and seems not working in native view
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2020 11:23 PM
Hi Narsing,
Can you please check my code and let me know what I am doing wrong here, if its working for you?
Thanks,
Ram Prakash K R
