Would a custom snippet be able to automatically render a number field with increasing value? I have a table which outlines a travel itinerary, with sectors 1 through X. (say maximum 20 sectors) Currently the user has to manually ‘number’ each sector so that they stay in order. I tried ordering by Salesforce ID / Record ID, but the table rows are not saved in top-down order, they are being saved bottom up order by SF. (ie the user would have to enter the itinerary bottom-up for it to make sense after it is saved).
Greg, You can reverse the sort by adding “DESC” to the “Fields to Order Records By” box: However, your users will still have to type the numbers in each time. It sounds like you want to store the number with the associated row (i.e., if a user changes the sort after the table loads, the numbers should move with their rows). Is this number column a custom field on the Object?
Hi J, thats right - the number needs to be stored with the associated row. Yes, the number column is just a custom field on the object
Hi Greg, thanks for the quick response. We use a Skuid wizard for creating a new Quote. We have several custom objects that lookup to the Quote object for creating line items.
I used the below Description of Work table as an example. When I create new line items within the wizard, it populates as 1, 2, 3 (below). However, when I save and go to the Detail page, it will sort the line items differently.
We would like to preserve the order that is created in the wizard and it seems the best solution is to add a custom field, such as Line#, that can be auto-populated as you create new line items in the wizard and have the Detail Page sort based on the Line# column.
Any help is much appreciated!
If you are ok with users manually entering the order of each line item, then the easiest way to preserve the order of the line items in your detail page is the “Fields to Order Records by” box in the Advanced Tab of the model you have for the line items. You would need to put the name of the line item field e.g. “line_item_c” followed by “ASC” (to sort ascending…1,2,3…) or “DESC” to sort the other way. So it would look something like this: