Barcode scanning for few items once by once to a list, then sync instead of syncing immediately

Neil_Shih
Participant I

Hi all,

I wanna create an action or a behavior to invoke the barcode scanner, so it behaves like a supermarket checkout and I am successfully to do it after taking a reference of this article: Barcode Scanner action

Additionally, I would like to scan a series of barcode first, which means a list of items, then upload or sync all of the data manually instead of upload or sync the data immediately after scanning one item after one. Just like the photo shown below:

Sorry for my poor expressions and limited English level.

Thanks in advance.

Solved Solved
0 9 1,696
1 ACCEPTED SOLUTION

First note: Please consider to set the [Product Barcode] column to required.
And under UX --> Options --> turn on โ€œAdvance forms automaticallyโ€.
This will open up the scanner immediately without having to click on the scanner Icon.

To your question:
Under Behavior --> Offline/Sync --> enable โ€œDelayed syncโ€ and disable โ€œAutomatic updatesโ€.
This will queue up the scanned Barcodes. 2X_3_3b9d9059970401b21fcfdfb31473c9909fed87db.png
When you are finished with the series of Barcodes, you can manually sync.

Or: you can attach an Action to your form under Event Actions Form Saved.
This Action would automatically force a sync after you are finished with the series of Barcodes.
The Action should be โ€œApp: go to another AppSheet appโ€ with the Target:
CONCATENATE("#view=Your_Table_View&at=",NOW() + 1)
Under โ€œOnly if this condition is trueโ€ you can set a condition. For example you could Add another column at the end of your Barcode Form, letzt say [Sync] with one ENUM value โ€œSave and Syncโ€.
The condition in the Action would then be: ISNOTBLANK([Sync]).

Finally you will have:

  • Open the Barcode scanner
  • Scan a Barcode
  • Open the form again automatically
  • Scan as many Barcodes you like
  • At the last one click on โ€œSave and Syncโ€
  • The App syncs and brings you to the Table view.

View solution in original post

9 REPLIES 9

First note: Please consider to set the [Product Barcode] column to required.
And under UX --> Options --> turn on โ€œAdvance forms automaticallyโ€.
This will open up the scanner immediately without having to click on the scanner Icon.

To your question:
Under Behavior --> Offline/Sync --> enable โ€œDelayed syncโ€ and disable โ€œAutomatic updatesโ€.
This will queue up the scanned Barcodes. 2X_3_3b9d9059970401b21fcfdfb31473c9909fed87db.png
When you are finished with the series of Barcodes, you can manually sync.

Or: you can attach an Action to your form under Event Actions Form Saved.
This Action would automatically force a sync after you are finished with the series of Barcodes.
The Action should be โ€œApp: go to another AppSheet appโ€ with the Target:
CONCATENATE("#view=Your_Table_View&at=",NOW() + 1)
Under โ€œOnly if this condition is trueโ€ you can set a condition. For example you could Add another column at the end of your Barcode Form, letzt say [Sync] with one ENUM value โ€œSave and Syncโ€.
The condition in the Action would then be: ISNOTBLANK([Sync]).

Finally you will have:

  • Open the Barcode scanner
  • Scan a Barcode
  • Open the form again automatically
  • Scan as many Barcodes you like
  • At the last one click on โ€œSave and Syncโ€
  • The App syncs and brings you to the Table view.

Thanks, Fabian. Let me try this.

Wow. I canโ€™t believe it. It works perfectly and what I prefer. Thanks a lot, Fabian.

Youโ€™re welcome

Iโ€™m happy that it works for you, can you please share the steps used in creating the app including spreadsheet data structure. I have tried many times to replicate such an app but so far without success.

Many thanks

Hi App,

Sorry for late reply. I was out of town and didnโ€™t check the notifications in AppSheet Community till now.

I use the sample app โ€œInventory Managementโ€ as a base for trial, and then create a new sheet in excel (cloud drive) and a table in AppSheet called โ€œScanningโ€ with only 3 columns, Timestamp, Barcode and Quantity.

Timestamp: DateTime (Type), set as a key, Show๏ผˆoff), Initial value [ =now() ]
Barcode: Text (Type), set as a label, Show๏ผˆon), Search (on), Scan (on)
Quantity: Number(Type), Show๏ผˆoff), Initial value [ =1 ]

After that, create a slices named โ€œBarcodeโ€.

Source Table: Scanning
Slice Columns: _RowNumber, Timestamp, Barcode
Update mode: Updates (tick), Adds (tick)

Finally, create a UX.

For this data: Barcode (slice)
View type: Form
Auto save: On
Auto re-open: On

If you need manually click synze button as what I need, you can refer to Fabianโ€™s reply.

Behavior --> Offline/Sync --> just enable Delayed sync and enable Automatic updates.
The App will then sync in the Background without any waiting / interaction by the user.

Thanks.

But one question remains: Why do you want to queue up the scanned Barcodes?
What is your use case?

The network connection is not good enough. If the data sync immediately after scanning a barcode, they need to wait 2 to 3 seconds for syncing, and then further scan next barcode. They think itโ€™s a kind of wasting time for waiting because of the network problem. Btw thanks a lot, Fabian.

If thatโ€™s all, then under Behavior --> Offline/Sync --> just enable Delayed sync and enable Automatic updates.
The App will then sync in the Background without any waiting / interaction by the user.

Top Labels in this Space