- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2019 03:14 AM
Hello All,
I have provided below attribute in a reference field but sorting is not happening.
I need to sort sys_created_on
ref_auto_completer=AJAXTableCompleter,ref_ac_columns=short_description;requested_by;sys_created_on,ref_ac_columns_search=true,ref_ac_order_by=sys_created_on
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2019 03:38 AM
Hello,
I have tried with these same attributes and it seems to sort in ascending order of sys_created_by.
If you want it by descending order then you might have to write a query Business Rule.
It is explained in detail in this thread - https://community.servicenow.com/community?id=community_question&sys_id=23bec761dbdcdbc01dcaf3231f9619bf
Business Rule would look something like
(function executeRule(current, previous /*null when async*/) {
current.orderByDesc("sys_created_on");
})(current, previous);
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2019 03:38 AM
Hello,
I have tried with these same attributes and it seems to sort in ascending order of sys_created_by.
If you want it by descending order then you might have to write a query Business Rule.
It is explained in detail in this thread - https://community.servicenow.com/community?id=community_question&sys_id=23bec761dbdcdbc01dcaf3231f9619bf
Business Rule would look something like
(function executeRule(current, previous /*null when async*/) {
current.orderByDesc("sys_created_on");
})(current, previous);
Hope this helps!