In catalog item company name variable is refrence to cmn_cost_center table, how we can di

Archana23
Tera Contributor

In catalog item company name variable is refrence to cmn_cost_center table, how we can display the records in alphabetical order, I am displaying 20 records by giving name is one of C000
C001
C003
C004
C005
C006
C007
C008
C009
C010
C011
C012
C013
425N
451T
466M
4PC6
5219
528X
539E
5532
5537
5562
568B
583E

Archana23_0-1744033201904.png

How we can display them in alphabetical order by displaying alphabets first and numbers later.

4 REPLIES 4

Rohit  Singh
Mega Sage

Hi @Archana23 ,

 

In company name reference variable add a reference attribute. 

ref_ac_order_by=field_name;      // Filed Name which show C007, C011

 

If my response helped, please hit the Thumb Icon and accept the solution so that it benefits future readers.

 

Regards,
Rohit

Ankur Bawiskar
Tera Patron
Tera Patron

@Archana23 

this variable attribute when used in the variable configuration will work only for portal and not native

I gave the code field as I am assuming that's what is storing C003, 466M etc

ref_ac_order_by=code

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi,

 

Thanks for reply.

Tried this but numbers are coming first , alphabets are coming later but need aplhabets first and number later

You're going to need to have an order field or some other field to sort by. In ASCII, numbers are always lower order than letters.