Issue with ordering

Sathwik1
Tera Expert

In a catalog item I had a field which refers to the "Variable" table..

and in that I used the below reference qualifier...and it is working fine...but here issue is...

with that reference qualifier for example....if I am getting output like below...

test

example

success

Customer needs output like this....

success

test

example

they need success variable first....and remaining in ascending order... is it possible?

Used below reference qualifier.

cat_item=b3819567rtg79b0678u992y6ub9423f^nameNOT LIKEmainfield^active=true^nameNOT LIKEstart^name!=field1^ORname=NULL^name!=field2^ORname=NULL^name!=field3^ORname=NULL^name!=field4^ORname=NULL^name!=field5^ORname=NULL^name!=field6^ORname=NULL^name!=field7^ORname=NULL^name!=filed8^ORname=NULL^name!=ffield9^ORname=NULL^name!=field10^ORname=NULL^name!=field11^ORname=NULL^name!=field12^ORname=NULL^name!=field13^ORname=NULL^NQsys_id=c1954d7dbe9001462c4fefer5c964332^ORsys_id=t54ea45r4re5423r4c4fe9b045r431^name!=field67^ORname=NULL

@Ankur Bawiskar 

 

1 ACCEPTED SOLUTION

Hi,

you can decide the field on which you want to order from the item_option_new table

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can try this and test once

in the variable attributes for portal

ref_ac_order_by=question_text

javascript: 'ORDERBYquestion_text^' + 'cat_item=b3819567rtg79b0678u992y6ub9423f^nameNOT LIKEmainfield^active=true^nameNOT LIKEstart^name!=field1^ORname=NULL^name!=field2^ORname=NULL^name!=field3^ORname=NULL^name!=field4^ORname=NULL^name!=field5^ORname=NULL^name!=field6^ORname=NULL^name!=field7^ORname=NULL^name!=filed8^ORname=NULL^name!=ffield9^ORname=NULL^name!=field10^ORname=NULL^name!=field11^ORname=NULL^name!=field12^ORname=NULL^name!=field13^ORname=NULL^NQsys_id=c1954d7dbe9001462c4fefer5c964332^ORsys_id=t54ea45r4re5423r4c4fe9b045r431^name!=field67^ORname=NULL';

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur, I think order by question_text gives in ascending order but here I need to show first variable as "success" variable... remaining I can set any...but first variable needs to fix..

Hi,

you can decide the field on which you want to order from the item_option_new table

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Sathwik 

Did the sort work fine in both native + portal as per my above steps?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader