order field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 05:11 AM
Hi,
How do I determine for a record in the table, that the value in the order field will always be the smallest
(that is, it will always be displayed last)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 05:47 AM
Hi,
You can put the -ve order on the record that you want to display last. On other records you can keep on adding +ve values.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 05:54 AM
I need only the record that I need to be last to have an order, I have many more records in the table, how do I put an order for them automatically so that they will be the first

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 06:05 AM
You can use default value configuration on Order to set any value as default. This will work for new records. If you have not created field yet then use default value while creating field.
But for other records you may need to run background script to set order value.
Simply use below script:
var myGr = new GlideRecord('table_name');
myGr.query();
myGr.setValue('u_order', 10);
myGr.setWorkflow(false);
myGr.autoSysFields(false);
myGr.updateMultiple();
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2023 06:59 AM
Will it only work on new records?