Rebase a table's incrementing multiple value on record add/edit

Here is my use case. I have a table with content for a letter. Each row represents a paragraph in the letter. The order of the paragraphs is controlled with an [Order] column that takes a number.

By default each row’s [Order] are an incrementing multiple of 10. New content can also be placed in between existing rows, e.g. an [Order] value of 21 will put that paragraph between the paragraphs with [Order] values of 20 and 30.

What I would like to happen is to have these values rebase whenever a new “in between” [Order] value is introduced (either by an add or edit).

For example: There are three existing rows with Order values of 10, 20, and 30. Two new records are added with values of 21 and 25. Upon sync, a workflow is triggered and everything is rebased to multiples of 10, like this:

  • 10 → 10
  • 20 → 20
  • 21 → 30
  • 25 → 40
  • 30 → 50

Has anyone done something like this? Any ideas for how I can approach this better? My main desire is to avoid a situation where these values become too crowded and adding or reshuffling paragraphs becomes very cumbersome.

Looping with actions Tips & Tricks ?

Kinda burnt out and just wanna get this out. I’ll try to circle back later and provide some documentation. https://www.appsheet.com/samples/Examples-of-loops-using-actions?appGuidString=7b9ae746-1f51-4ecb-8c39-b322e1c12da6

2 Likes

@Steve, thanks for pointing me in the right direction. The “add across dates” example was particularly insightful. I’ll definitely give this a crack in the weeks to come.

2 Likes