Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Inventory barcode scanning – assign box/ placement
- This topic has 8 replies, 4 voices, and was last updated 5 years ago by Max Heart.
-
AuthorPosts
-
December 2, 2019 at 11:42 AM #38427
Max HeartParticipantHi everyone,
I am new to Tap Forms. I purchased it to create a home inventory of the stuff I have at home (of course, way too much stuff …).
Here’s my setup: I created three forms. First one is for the individual items. The second one is for the box the item is located in and the third one is for the location in a certain room or a shelf location. Form 2 is linked to form 1 (one box, many items) and form 3 is linked to form 2 (one location, many boxes).
The items (form 1) have a barcode label and boxes (form 2) have QR labels. Each of them are unique identifiers. Items are numbered A001, A002, … and boxes Box001, Box002, etc.
Here’s my challenge: Is it possible to assign an item to a box just by scanning first the item and then have the Tap Forms iOS app asking me to scan box QR code? That would be fantastic. Next level would be to use this for checking in and out items from boxes.
Best regards from Germany, Max
December 3, 2019 at 1:11 AM #38443
BrendanKeymasterHi Max,
The barcode scanner in Tap Forms can be used for two purposes.
1) to search for records.
2) to enter data into a field in a record.There’s no functionality to automate the user interface like that so that when you scan one barcode, Tap Forms then asks you to scan the next. You would have to just tap on the different fields and then display the barcode scanner yourself to scan the barcodes into the fields.
You can do it, but it just wouldn’t be automated like you’re asking for.
Thanks,
Brendan
December 3, 2019 at 7:35 AM #38449
Daniel LeuParticipantIt would be great to be have a barcode scanning feature using the
Prompter()
. Than one could write a simple script and have the automation done as needed. This would enable very efficient inventory updates, among others.December 4, 2019 at 12:27 AM #38456
Max HeartParticipantThank you for the adivse, Brendan. That helps to streamline my workflow a little bit. Daniel’s suggestion sounds interesting even though I have no clue about the scripting in Tap Forms yet.
December 4, 2019 at 12:59 AM #38458
Sam MoffattParticipantPrompter barcode is in my wishlist as well. I currently use Siri Shortcuts to scan a barcode, copy it to the clipboard, use a
tapformz
URL to get Tap Forms to open up the right document and form then useRun Script
to execute a script. It pulls the barcode from the clipboard and uses that as input to the script. It works reasonably well though I wish there were a way I could directly invoke a script for a document/form/script combination and pass it in parameters.December 4, 2019 at 1:47 AM #38460
Sam MoffattParticipantAn earlier iteration of my approach was to use ScanKey, a barcode scanning iOS keyboard, to scan input and process them. It’s a little clunky in that it jumps to it’s own app to do the scan, I remember needing to tap a button on it before it jumps back to the calling app. It has an OCR feature which is neat as well for when the barcode scanner misbehaved. It was annoying because you had to change the keyboard to activate it and changing the keyboard back, at least with my keyboard setup, was a little weird and it didn’t work properly.
First party support for barcode scanning in scripts would be neat though.
December 4, 2019 at 11:24 PM #38480
Max HeartParticipantHi Sam, your approach sounds interesting for making a barcode search more convenient. Can you post your script and tell me where to place the script? I have no experience with the Tapforms script.
I am just wondering: My goal is to create a check in / check out workflow. If the script is already able to pull certain records using a workflow like yours, then could it also do the next step:
1. Prompt for an item barcode, then search for the record in the items form
2. Prompt for a box QR code, then associate it to the item
3. Go back to step 1, unless the user cancels the script by tapping on a “stop” button in the prompt.What do you think?
December 5, 2019 at 9:55 PM #38502
Sam MoffattParticipantIt’ll require a bit of customisation, I use this with shipping records to mark them delivered and confirmed (unconfirmed shipment delivery would be sync from automated systems). This is the one that grabs from the clipboard, looks for a candidate matching record and then updates it’s state:
var clipboard = Utils.copyTextFromClipboard(); if (clipboard) { clipboard = clipboard.split("\n")[0]; } var tracking_number_id = 'fld-c487390743c947969cbe661cff596855'; var received_date_id = 'fld-e3e3539ee04f4cc7971c7098c572104d'; var confirmed_id = 'fld-2adb9ba8cdd048bbbb614d46b415ada5'; var alternate_tracking_numbers_id = 'fld-cf8718051bea4cc2aba0069ae76f32b7'; var alternate_tracking_number_id = 'fld-7342203d8f36415191bf8419fb6f70dc'; function findRecord() { var targetRecord = null; MainLoop: for(candidateRecord of form.getRecords()) { if (clipboard == candidateRecord.getFieldValue(tracking_number_id)) { targetRecord = candidateRecord; break MainLoop; } for (alternateRecord of candidateRecord.getFieldValue(alternate_tracking_numbers_id)) { if (clipboard == alternateRecord.getFieldValue(alternate_tracking_number_id)) { targetRecord = candidateRecord; break MainLoop; } } } if (targetRecord) { targetRecord.setFieldValue(received_date_id, new Date()); targetRecord.setFieldValue(confirmed_id, true); document.saveAllChanges(); form.selectRecord(targetRecord); return "Updated existing record for " + clipboard; } else { return "Unable to find matching record for " + clipboard; } } findRecord();
This is a similar form script that uses the Prompter to ask for input and then creates a record:
// Order: Shipment Field ID var shipments_id = 'fld-db2fcdb4d79c466ea09671c47d2ae645'; // Order: Ship Date var ship_date_id = 'fld-6ab700ccc11d418fbd27d8899d00c7a9'; var ship_date = record.getFieldValue(ship_date_id); // Shipments: Record Field ID's var tracking_number_id = 'fld-c487390743c947969cbe661cff596855'; var carrier_id = 'fld-0950c430cb0c41f79c51d43a544b366b'; var shipping_date_id = 'fld-1aa32f17e059424fb4e24bf894b34fdf'; var callbackFunction = function() { if (tracking_number && carrier) { var data = { [tracking_number_id]: tracking_number, [carrier_id]: carrier, }; if (ship_date) { data[shipping_date_id] = ship_date; } else { data[shipping_date_id] = new Date(); } console.log(JSON.stringify(data)); var shipmentRecord = record.addNewRecordToField(shipments_id); shipmentRecord.setFieldValues(data); document.saveAllChanges(); } }; let prompter = Prompter.new(); prompter.addParameter('Tracking Number', 'tracking_number', 'text') .addParameter('Carrier', 'carrier', 'picklist', 'Carrier - Shipments') .show('Message prompt', callbackFunction);
The Prompter stuff uses a callback mechanism which means it’s not blocking so it takes a little bit of work to turn that into a continuous loop but it would be possible to do.
Creating a checkin/checkout flow is certainly possible though, not the most elegant but definitely possible.
December 8, 2019 at 2:09 PM #38583
Max HeartParticipantThank you, Sam. I will need some time to understand everyting. But that’s a great start.
-
AuthorPosts
You must be logged in to reply to this topic.