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,

Solved Solved
1 41 11.2K
1 ACCEPTED SOLUTION

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 )))

View solution in original post

41 REPLIES 41

sen
Bronze 2
Bronze 2

Any solution yet?

These days you can add a Google Drive Folder as a table inside AppSheet. This way you can "connect to files within a Google folder. AppSheet will provide a table with the folder contents and file metadata to use within your application." See here how-to.

This means you will have access to file IDs and can quite easily generate URLs by looking up the file name and returning the file ID.

Another way would be to create a Bot that generates a URL after a picture is saved (already mentioned above).

If you use an external Database (eg. MySQL, SQL server) you could also offload this by computing the value of the column by applying a formula on the database column such as (for SQL server): 

('https://www.appsheet.com/image/getimageurl?appName=SIS10-cloud-912852&tableName=student&fileName='+[YourImageColumnName]) 

Top Labels in this Space