Gliderecord order sequence matter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2024 04:26 AM
Hi Team,
While we move orderByDesc to below the orderBy we are getting correct data. However, with the given screenshot, we did not get the correct data so, does this sequence of orderBy matter? if yes, can anyone provide me with some references?
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2024 05:40 AM
Hi @dgarad ,
Yes it does matter !! You need to use tow function
1. orderBy
after it you should use.
2. orderByDesc
Example :
var gr = new GlideRecord('incident');
gr.addQuery('active', true);
gr.orderBy('category');
gr.orderByDesc('sys_created_on');
gr.query();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 09:40 PM - edited 06-23-2024 10:26 PM
Hi @Community Alums
do you have any references?
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2024 11:54 PM