Take image from image column and display as link

Hey Everyone,

Simple request… Just cant seem to get it to work,

User take images in app, Image is displayed. All good.
Now also need capability to go to image link. for image download etc, various other stuff. idk

Setup a virtual column called [Image Link]
Trying to set the formula as [Image] to copy from my image column. This obviously doesn’t work. So I now have it as ENCODEURL([Image])

The link doesn’t seem to open. Thinking I need to Encapsulate this expression with some other stuff, but cant figure out what. Images are all hosted in google drive

Thanks guys,

You need to create the getablefile link… It’s down a bit…

1 Like

Yes but im wondering how to get the file id as the image itself was taken in the app.

It’s always the same concatenation, you can recreate it. I think it’s the key, image column, and some form of datetime…

Sorry man, I’m not seeing the connection. In my spreadsheet I’m just seeing the file location, not the file ID or anything. Is there a standard expression for this or everyone does it different? Not sure where to start.

I don’t take in-app pictures, so I don’t completely follow information regarding it, but as @Grant_Stead said, it should be easily recreatable. I would go to the folder where all these images are being stored and look at their filenames. As you analyze those, they should start to line up with some form of what Grant said. That should help you get the full path.

Im sorry I have been doing that but im not seeing any relation between the file name and the File ID at all.

Sorry, I can’t provide additional help in regards to this one. All the images I use are named images that I pre-uploaded. So I know the exact URL for them.

Hopefully someone else has had the same issue. :slight_smile:

I don’t think I understand EXACTLY what you’re trying to do?

So user take images of the delivery slip in our receiving app.
I have others who need to be able to download and print this image.

Can’t they just select the image to open it, then right click to save it?

I think the quality still goes down little even though I have it set to full image quality upload. Was thinking with a link going to the original image would be better quality. Correct me if I’m wrong, as this doesn’t seem to be an issue other have encountered :slight_smile:

The main issue here that you need to work around is that the way google drive stores the images, is that even if you you have the folder shared, public, it’s very hard to have the “Public Link” to the actual image from google drive… So around here, we typically can get a strange work around to a public link, based on that concatenated getablefile url…

Have you tried creating the getable file url to see if that works?

What is a getable file URL?

You see the problem is somehow I need to get the file ID for any of this to work. Once I can get that someone with app sheet, I’m good.

Ah, I did not notice the detail of Google Drive. Unfortunately, there is currently no known way to determine the File ID that Drive produces for sharing the file, outside of going into Drive and sharing it from there. Now that Google owns AppSheet, it is possible we eventually get that functionality. But for now, there is no way to get that URL programmatically.

So, It’s further down in the help article that I sent you…

Format:

=CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=”, ENCODEURL(" AppName-Account# “), “&tableName=”, ENCODEURL(” TableName "), “&fileName=”, ENCODEURL(+ ImageColumnCell ))

Sample:

=CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=”, ENCODEURL(" Inventory-114348 “), “&tableName=”, ENCODEURL(” Orders "), “&fileName=”, ENCODEURL(+ B2 )))

To find the application name to include in the image URL, look at the URL bar of the app editor browser window. It should contain something like "https://www.appsheet.com/Template/AppDef?appName=Inventory-114348". The application name is the value following “?appName=”. In this case, the application name is “Inventory-114348”.

To find the table name to include in the image URL, do this:

  1. In the app editor, go to the Data > Tables pane.
  2. Expand the table that contains the image field.
  3. Copy the value in the Table Name property.

To test the image URL, copy the constructed value into any browser window. The image should render. If there is something wrong with the image URL construction, the image will not render and instead you will see a message indicating that the page could not be found. Almost always, this is because the application name specified is incorrectly.

Now that you have the correct image URL, you can embed the image inline within your Google spreadsheet. To do so, add another column (you could call it Image Preview for example), and then wrap the image URL in an IMAGE() expression.

Format:

=IMAGE(CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=”, ENCODEURL(" AppName-Account# “), “&tableName=”, ENCODEURL” TableName "), “&fileName=”, ENCODEURL(+ ImageColumnCell )))

Sample:

=IMAGE(CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=”, ENCODEURL(" Inventory-114348 "), “&tableName=”, ENCODEURL( “Orders”) , “&fileName=”, ENCODEURL(+ B2 )))

1 Like

Ok, I will work through this. Thank you. Will get back to you on this tomorrow.