When using the OCR function, the photo is captured first, and then the text data in the photo is recognized. But, in a continuous process of label scanning this generates a large number of photos which are stored. I wonder, could AppSheet read the photo (as OCR) without storing it, just as it does when reading a QR or barcode?
Hi @SmartD, right now you need to store the photo to get the text. Could you say more about your use case?
We have bags of different types of flour that leave a production line continuously. Every day inventories are made to find out where the flour is stored and to be able to dispatch it according to the batch and the expiration date. Our intention is to optimize the inventory process for which, instead of writing the batch and the expiration date on a form, we only read the label that the product has. But the label does not have a barcode and while generating new labels with barcodes we wanted to make OCR captures of the label, but we are concerned that it will store a lot of space because the photo of each label is stored. So I wanted to know if there was any way for OCR to work like reading barcodes or QR, without storing images.
For something like this, you could create a separate table that operates as your form. This table could only have one row, with columns that reset on every edit. You can also set the images to be uploaded at the lowest quality. When the user saves this form, you can copy all the pertinent information (like the OCR) to your main table.
The images will still be uploaded, but without any references to displaying them, the app won’t attempt to load them, and therefore the speed of your app should be preserved. You can then just go into your cloud storage and delete the pictures occasionally.
Not perfect, but it should work in your situation. I’m still waiting for OCR to be able to work for images that are already pre-uploaded and referenced via a relative path.
If you’re using google sheets in a gdrive you may be able to use GAS to delete the image after the record is created.
@SmartD I need the same and tried different things.
An Event Action on Form Saved, that deletes the [Image] column.
It’s possible. The image column get’s deleted, but the image will be stored in Google Drive.
So you won’t see the image in your App, but it will consume storing space.
Manually deleting the image while still in the form view.
In the [Image] column you can set the Require? to ISBLANK([OCRTEXT]) and the Valid if to ISBLANK([_THIS]). This will make image required. After OCR is extracted, the image column will get invalid. User would have to manually delete the image before he could save the form.
But: When you delete the image, also the OCRTEXT gets deleted, because it’s somehow connected to each other. The user has to interact with the [OCRTEXT] column, like adding a space. Once interacted, he can delete the image and the OCRTEXT will stay.
Thanks to everyone for your replies.
I conclude that the best solution to this problem is that AppSheet improves the platform so that reading a label via OCR does not imply scanning and saving the image, just as it is done when reading a barcode or QR.
The second alternative would be to create a script that automates the deletion of the images that are saved as a result of reading OCR. But finding this script and making it work in AppSheet is a problem for the less expert if we don’t have a sample.
The third and least desired alternative would be manual deletion.
Hopefully AppSheet can help us with the first or second alternative.
Here is the feature request
This was working. Or it never worked and I was stupid
Thanks a lot Fabian for taking the time to respond. It seems to me that what you are doing is deleting the link to the image in the table, but this would have already been uploaded to the Drive. In any case I will do the test.
Yes that’s right.
With zapier you can make a very easy integration so that every time a new image enters the Google Drive, it is deleted.