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! Go to 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.
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:
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.
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:
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.
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |