Convert an image to XY

Hi, I’m trying to build an app that the user can add an image and use this image for XY display.
I tried 2 methods but none of them work perfectly.

  1. [image] - insert an image in “FORM” view
    [Link] - {app formula: CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=",“Thisapp-34005-19-09-08”,"&tableName=”, “facilities”,"&fileName=",[image]) }

In the spreadsheet I got very long link that leads to error.

  1. I have created a Virtual column in order to invoke the [image] text, but the result was the same…

any advise how to do that within in app formulas

I hope I made my self clear (sorry for my English…)

thanks in advance Appsheet community

IF you are trying to do this at the same time when you are filling the photo on a form view because the image is not yet saved to your database. It will only work if you first save the record and then reopen it.

1 Like

I found a solution. Please correct me if I’m wrong.

In the XY Column you can use the “Background image for the XY coordinates” expression:

CONCATENATE(
    "https://www.appsheet.com/template/gettablefileurl?appName=My_App-12345&tableName=My_Table&fileName="
    , [Ref_Column].[Image_Column])

This would produce a link that will not work:
https://www.appsheet.com/template/gettablefileurl?appName=My_App-12345&tableName=My_Table&fileName=My_Table::My_Table_Images/0afb8fcb.Image_Column.091309.jpg

But if you use this expression, it corrects the link by deleting the “My_Table::” Part.

CONCATENATE(
"https://www.appsheet.com/template/gettablefileurl?appName=My_App-12345&tableName=My_Table&fileName="
, ENCODEURL(RIGHT(TEXT([Ref_Column].[Image_Column]),LEN(TEXT([Ref_Column].[Image_Column]))-8)))

I don’t know how stable this is, but at least you don’t need an extra Column with a Google Sheet Formula as described here under “Showing Images in Google Sheets”.
(I’m working with Database, so I cannot use the Google Sheet Solution)

2 Likes