I have an idea. It’s not pretty, but I think it will work (for small scale apps at least).
The basic problem, as I see it, is that a table of data may look like a spreadsheet but it is crucially different in that each row of data has a hard time getting any data from the row above it or below it - each row is separate. To solve this sorting problem you’d like to know the sequence number of the row above and can’t get it.
So my very messy solution is to use the only function that spans rows - Rollup.
First of all create a new table called ‘Sequence’
Add a field called ‘WorkingDB’.
Then in the WorkingDB table create a 1:1 connection to the Sequence Table. And create a rule so that each time a new WorkingDB record is created its adds a new connection to the record in the Sequence table. (There is a new Pipe that does this - called ‘Plucker’).
Now you have two tables.
Your original table, and a Sequence table with a record that is is connected to by all (existing) WorkingDB records.
Now you can use Rollup. Add a Rollup field to the Sequence table, and concatenate all your IndexPositions from the WorkingDB table.
You will end up with a long string of all your current index positions, separated by a delimiter character - probably a comma. (You can see why its not going to scale to big tables)
Then, in your WorkingDb table you can now add a Text Formula field and pull in that Rollup (yes that’s a long string added to every record !)
And then add a formula field to LOCATE the line Index within that string. This will give you the startinng character position of the line Index, but this not the new Index number - not yet.
Then you need to us LEFT to select only the characters before your string. What you want to do with this string is to count the number of delimiter characters in the string, but there is no Count function, so you will need to REPLACE all other characters with blank “” until you are just left with a string of delimiter characters. Now you can use LEN to count the number of delimiters.
And your real Index will be that count + 1.
And if records are deleted in the listing, it will respond.
Messy, probably too complex. But would work.