Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

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

Raghav Sharma24
Giga 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... 

Then for lookup what i can use

Gunjan Kiratkar
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();

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.