When you executing an event on multiple rows is there any way to require that all tasks for a row complete before moving on to the next row? I have a bot that updates an invoice number a row, then runs an action that increments the invoice number. The invoice number being incremented is stored in a separate table so it takes a lot longer to run this action and the bot moves on to the next row before it finishes. Adding a wait is not really an option since the minimum time is 5 minutes and there are about 80 rows to iterate.
AppSheet is a distributed system and does not handle at all the processing needs of managing sequential numbering - especially if that sequential numbering needs accessed by several users simultaneously.
I would strongly suggest to abandon the concept of a sequential invoice number altogether and instead use randomly generated Invoice Numbers. It will make the app implementation much, MUCH simpler.
Most say their client insists on a sequential number. I would convince them otherwise. There is no real reason to have them except some person saying they want it because its “what I’m used to”.
HOWEVER, as an alternative, IF your process you describe can run off-platform and is not dependent on multi-user access, I would advise that you create a Google script and call that to perform your sequential number. This will allow you full control over the looping process.
Make the central finance department of a state government change their invoice system? Good luck with that. It turns out that they don’t have to be sequential just unique so I can use something like Fiscal Year + Row Number.
I though about using a Google Script but I’m trying to keep things as maintainable as possible if I wasn’t here for some reason.
This is very disappointing for a supposedly enterprise level application.
Sure! I have worked with gov agencies before. The only real hurdle is if the data is publicly accessible then you have to worry about interrupting unknown users pulling the data down into their own respective systems.
It’s not related to the quality/level of the system. It’s the method of processing. AppSheet is a distributed system. This means each user gets their very own instance of both app and data which allows usage of the app in offline mode. Each instance operates independent and without any knowledge of what might be happening within other instances.
For sequential processing to work across multiple users, there MUST be a single controlling source that gives out the next value in sequence such as a server in a client/server system or a central computer such as a mainframe or mid-frame computer. This is not supported in a distributed system.
There are tradeoffs. AppSheet supports offline mode. A system that relies on some control source such as for sequential numbers/values would have trouble supporting offline operations.
For what it’s worth, the need for sequential numbers/values is archaic. The reasons for its use in the past can be accomplished in other ways in today’s world.