I am making a new app with two tables 1- Shipments 2- Shipmentlines to prepare shipments everything went good until i arrived to the Scanning part, i would like pick an item and increment quantity by scanning it with a PDA honeywell EDA51, i need your support guys to show me what are [ Actions and Automations ] i should use to make scan and increment qty possible.
thank you for the support, i already know these templates apps, they are great, but the only thing that i look for is Live scanning and incrementation that’s realy helping when preparing an order, i just need to know if is there solution using [ Actions & Automations ].
Thanks for the clarification! And yes, you can auto increment a column in AppSheet by using an automation that runs a “Set the values of some columns” action when a new row is added.
This action will find the maximum current value in the column and add one to it, or you can use the built-in UNIQUEID() expression to generate a unique ID for every new record, which is simpler and avoids potential conflicts.
Using an automation with a max value formula
This method is best for a predictable, sequential number, but requires careful setup to avoid issues with concurrent users.
In the AppSheet editor, go to Automation and create a new automation.
Set up a process:
Event: Create a new process with a Data Change event that triggers “When a new record is added to [your table]”.
Process: Add a step to “Set the values of some columns.”
Define the action:
Table: Select your table.
Columns to set: Select the column you want to autoincrement.
Value: Use an expression like MAX([ColumnName]) + 1.
Add a safety net: To handle cases where the column is empty, add an `IF()` expression: IF(MAX([ColumnName])=0, 1, MAX([ColumnName]) + 1).
Set the column as Key: Make sure this column is marked as the Key in your table schema to ensure it’s a unique identifier.
Using the UNIQUEID() expression
This is the easiest and recommended method for generating a unique identifier, as it works reliably for all users and offline scenarios.
Add a column: Add a new column to your table (e.g., RecordID).
Set the initial value: In the column’s Initial value setting, use the expression UNIQUEID().
Regenerate the table structure: Click Regenerate to apply the change.
Set the column as Key: Set this new column as the Key in your table schema.
Note: While MAX() creates a sequential number, UNIQUEID() is safer for preventing duplicate IDs when multiple users or devices are adding records concurrently.