Order by not working in list collector?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:28 AM
What is wrong with the list collector I am unable to show data on the portal form with order by u_order field.
variable attribute - ref_qual_elements=category,ref_ac_order_by=u_order,ref_auto_completer=AJAXTableCompleter
Reference qualifier - javascript: 'u_inactive=false^u_type=subcategory^u_dependent =' + current.variables.category+'^u_catalog_item='+(current.cat_item.sys_id||current.request_item.cat_item.sys_id);
I am getting the data based on the category selected. but order is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:36 AM
ref_ac_order_by is applicable to reference fields only.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:42 AM
Then for lookup what i can use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:42 AM - edited 11-22-2022 02:43 AM
Hi @rahul16
Do not do anything in the Variable Attributes section, in place of that update the "Reference qual" of the variable as below--
ORDERBYu_order
Demo :-
javascript: 'ORDERBYu_order^u_language='+gs.getSession().getLanguage();
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:45 AM - edited 11-22-2022 02:58 AM
javascript: 'u_inactive=false^ORDERBYu_order^u_type=subcategory^u_dependent =' + current.variables.category+'^u_catalog_item='+(current.cat_item.sys_id||current.request_item.cat_item.sys_id);
Yes, I try like that too but it's not working for the subcategory but for the category, it's working.