Hi, Im looking to get the URL of the images c...

(Paul Pillay) #1

Hi, Im looking to get the URL of the images captured by my mobile, so I can create the link in my SQL database.

I think the below formula is what I need, however, it there a predefined expression to get the AppName?

I may need to copy this App and would like to dynamically get the AppName.

The tablename will always be same.

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


(Dinh Nguyen Nguyen) #2

@Paul_Pillay Hi Paul, could you explain why you need to use an expression to create image links? Each time you capture an image, AppSheet will automatically generate and store the path to the image in your cloud storage provider in your SQL table for you.

(Paul Pillay) #3

Hi Dinh, when I checked the sql entry it only saved the “tablename/imagefilename”.

Im I missing something?

I created a column in my sql database (as text), then set the associated column’s datatype in Appsheet as ‘Image’. Thanks

(Dinh Nguyen Nguyen) #4

@Paul_Pillay Hi Paul, the image paths saved in the SQL table are only the relative paths of the images. The assumption is that the images will all be saved in the root folder of your app. Hence, the relative paths will only point to folder within the app’s root folder. So, if the path is “tableName_image/imageName.jpeg”, then this means that within the app’s root folder, there’s a folder named “tableName_image” that stores all images of the corresponding table, and within this image folder, there’s an image called “imageName.jpeg”. To find where the app’s root folder is, you can go to the Info > Properties tab in the editor, and check the “Default app folder” setting.

(Paul Pillay) #5

I can see the images in the root folder in dropbox as you have described.

However, I am only using dropbox for the authentication to the app.

All the data is in my sql database which I have added as a datasource.

So the app works fine capturing and displaying the images.

However, I also have a windows application which also interacts with the sql database.

I am trying to show a direct URL link in my windows application to view the image captured on the app.

Im planning to roll out an sql database and associated app per customer, so I can’t hardcode the datasource path (dropbox, box etc) or app name.

I was hoping I could pull the appname when a image is captured, then use the formula to generate the URL link

(Dinh Nguyen Nguyen) #6

@Paul_Pillay I’m afraid there’s currently no expression to retrieve the app name dynamically, so you’ll need to hardcode it into the expression. Another thing to keep in mind is that you’ll need to URL encode the entire link generated by the expression. To do so, you can use the ENCODEURL({link}) function.

(Paul Pillay) #7

ok thanks for your help