- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2023 04:51 AM
Hi i want to set my table reference field to show data in descending form as latest data created first i tried but its now oworking anyone has solution for this how this works?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2023 12:49 AM
this link has the solution.
it uses combination of variable attributes + query BR
Something like this
- Add the "ref_ac_order_by=sys_created_by" to the reference field.
- Create the before query business rule as below on your table:
(function executeRule(current, previous /*null when async*/) {
current.orderByDesc('sys_created_by');
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2023 04:56 AM
Hi @Priyanka Chaud1,
This article will help you to achieve you requirement
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0725720
If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2023 05:02 AM
Hey @Mohan raj I want to set descending order in catalog item portal page you are giving solution for navigator please tell me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2023 12:37 AM
Can u check this also @Ankur Bawiskar i am stuck here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2023 12:49 AM
this link has the solution.
it uses combination of variable attributes + query BR
Something like this
- Add the "ref_ac_order_by=sys_created_by" to the reference field.
- Create the before query business rule as below on your table:
(function executeRule(current, previous /*null when async*/) {
current.orderByDesc('sys_created_by');
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader