Automatically generate images URL

Hello there,

I have a column on my financial app for receipt images. On the excel sheet the data on that column is shown as the file name (generated by appsheet) and I would prefer if it was the link.

From all I have read, I created a new “image” type column and on “Auto Compute” there is a field called “Spreadsheet formula” and that is where I have been trying to creat a formula for that.
The table is in dropbox and that is also where the images taken by the app end up as well.
I would like some help to learn how to get that formula right, I am doing it based on the sample app called “images in sheets” but I think I am on the wrong path.

Thank you!

With the normal column it won’t work when you are adding the record. If you open and save it, the link will be correct.

=CONCATENATE(“https://www.appsheet.com/template/gettablefileurl?appName=",“AppName-AccountID”,"&tableName=",“TableName”,"&fileName=”,[ImageColumn])

If you add this into the virtual column and the column type is URL, it will generate the link.

4 Likes

Aleksi, you might think about “pin” your answer to show up on the top, as many people asking for this quite a lot. :smile:

Better:

CONCATENATE(
  "https://www.appsheet.com/template/gettablefileurl?appName=",
  ENCODEURL(“AppName-AccountID”),
  "&tableName=",
  ENCODEURL(“TableName”),
  "&fileName=",
  ENCODEURL([ImageColumn])
)
3 Likes

You are a star, as always.
Now it is a time for me to go to bed.

So soon? :slight_smile:

1 Like

Exactly now.

Thanks @Aleksi, @Steve and @tsuji_koichi

I managed to make it work on the virtual column. On the regular column, it creates the link but the link is broken as @Aleksi had already said it was going to happen. I oepend and saved the excel sheet and that did nothing to the link, it still give sme an error, is it really the file that was supposed to be open and saved?

Question 2: Is there anyway that it would generate a dropbox link instead?

I believe that’s (Dropbox link) not possible through your app.

If you create Appsheet account using your dropbox account IDs, then it could be possible

I believe @Cabelo is asking a link like https://dl.dropboxusercontent.com/s/72vf8e2f0qx6vw8/Milan4.jpg :slight_smile: