Hi folks,
I've been trying to solve this puzzle all day; there are quite a few scripting examples in the community here that I've tried to adapt to my use, to no avail.
Here's the situation:

These two columns should be ordered exactly the same, except that the one on the right gets jumbled up during a "find records" step in an automation that populates this field.
They're ordered this way in the line items table, but for some reason the "find records" step jumbles them up:

I need a script or formula that will re-order the line items in ascending order according to the purple-circled numbers in the line item IDs.
I have used Batch Update to do the job, but I'm looking for an automated solution that will sort the line items for use in a Zap that creates an invoice - and the line items need to be in a particular order.
Thanks for your help in advance,
Shawn : )