How to reference file column in an image column

I’m trying to use OCRtext() in browser mode but am running into a problem when I use the image column type because it always saves the image sideways and cannot recognize the text. I’ve noticed that if I take a photo using the file column type, the orientation of the image is correct but I cannot use OCRtext() on a file so the only way I can think of referencing it would be creating a formula in my image column to match the predetermined file path. Any suggestions on the best way I can do this?

You could try following to get "Image"in the “File” type column into “Image” type column.

  1. Where images and files are stored?

Quote from article on “Capturing Images”

*The captured image is saved in a subfolder in the same location as the spreadsheet.

  • The subfolder is called {TableName} _Images by default.
  1. Create a file type column called say [ImageFile]

  2. Suppose your images column is called [Images] , then in this column’s setting please define the file path as shown below. Note that in the example below the Table name where images and files are store is “Menu” . So as described in point 1 above, the default file path is “Menu_Images/”

Please remember double quotes while defining the path

In the App formula of [Images] column please have an expression like below.This expression will extract the file name from file path and put it in image column.

Now you should be able to see the “image file” in [ImageFile] column in [Image] column,

Edit: The above approach requires that the record be openedand closed again once the file is uploaded. An easier approach is to have a simple spreadsheet formula in the spredsheet itself and then regenerating the table. This approach will start showing the image in the image field once it is uploaded in the file field in the app.

As shown below the spreadhseet formula for cell B2 is “=C2”
image

4 Likes

Depending on how crazy you wanna get, you could consider an integration to modify the images prior to using them in appsheet.

1 Like

I actually was able to get it working with an action in detail view copying the text of the file to another column. Only problem is that I have to go back to form view to utilize ocrtext().

Using the backend formula on google sheets works a lot better than the way I set it up with an action, it was taking 30+ seconds to fully load. Thanks for your suggestion, it saved me a lot of additional trouble-shooting.

1 Like