Order by not working in list collector?

rahul16
Giga Guru

What is wrong with the list collector I am unable to show data on the portal form with order by u_order field.

 

rahul16_0-1669112732981.png

 

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 

 

12 REPLIES 12

RaghavSh
Kilo Patron

ref_ac_order_by is applicable to reference fields only.

Refer : https://docs.servicenow.com/en-US/bundle/tokyo-it-asset-management/page/product/service-catalog-mana... 


Raghav
MVP 2023

Then for lookup what i can use

Gunjan Kiratkar
Kilo Patron
Kilo Patron

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

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.