Reference qualifier descending order
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 12:33 AM
I'm using a "look up selection box" type variable in a catalog item.
I cannot find a way to sort the choices in ascending order.
Is there a way to sort the choices?
I have included the syntax "ORDERBY XXX" in the reference modifier, but it does not sort them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 12:40 AM
Hello @arai keigo
var inc = ''; var gr_incident = new GlideRecord('incident'); gr_incident.addEncodedQuery('caller_id='+caller); gr_incident.orderByDesc('number'); gr_incident.query(); while(gr_incident.next()) { inc += (',' + gr_incident.sys_id); }
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 12:51 AM
Hi @arai keigo
Try following:
in variable attributes: ref_ac_order_by=<orderFieldName>
and
in reference qualifier add= javascript:'ORDERBY<orderFieldName>'
note: replace <orderFieldName> with correct field value from the referenced table on which sort needs to be added.
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 07:03 AM