What is the best way to retrieve and view files in app that are generated from templates?

Thanks for the tip John. However my sheet is actually in the root directory of my g drive. But you are correct the attachements are stored in appsheet/data/mynewapp-505828/Attachments.I tryied this link as you suggested

didn’t work

I have seen a conversation above that the sheet needs to be in the myNewApp-50582 directory for the links to work. I moved it and it broke everything. I have pictures and signatures and barcodes in that sheet. they all started acting wonky. And by wonky I mean not displaying randomly. Moving back didn’t fix it. So I had to delete the source in appsheet move he sheet and reconstract everything. Sorry I side tracked.

I also tryied using this expression


and i just get this in my browser adress

So my syntax is wrong i just dont know where?

You are exactly right. I generate a PDF from a template and it is stored in a default directory. What I am trying to do next is put a link to this PDF directly into my sheet. It is usefull if I want to say print the pdf from the app without having to look for it in the emails.

Thanks I will consider this as my fall back plan if I cant figure out this “link” thing.

Please see at the bottom of this article
“Constructing an Attachment File URL”

1 Like

This works perfectly. Thank you so much @WillowMobileSystems .
It seemed much more complicated than what it actually was.

Yes please have my upvote. It makes sense to think it’ll default relative paths from appfolder and not the spreadsheet location. This not only makes it breaking change when moving spreadsheet, but it is also very unintutive, what if you have sheet on one data source and image on other.

I wish to add my vote to this behaviour. Does AppSheet have a feature request for this?

Could you help me do this? My company already has a folder system that contains many files in it. Inside those files are pdf’s (invoice). So, I am not having the user input/download the pdf - they are already there.

My users want to be able to find those pdf (Invoices) and either:

View it in app
Print it
Email it

How do I do this?

Does this only work if you are building/generating the pdf in/through the app? Or can I use this to search a drive and find a pdf with CONTAINS?

Hi @Tiger would that be a solution for you?

1 Like

I had been out on vacation. Did you get the answers/solution you were looking for on your questions? I see some posts after this one on the topic.

Hey. Thanks for the response. Sorry - now I was out :grinning:

No - I am confused on how to be able to do this. I see post on finding the document (IF you placed it in a file/folder - using the app). But I am not putting files in folders using the app.

I need the app to be able to search a file/folder system and locate a pdf without having placed it in using the app.

Does this make sense?

Sorry - I was out for a while. Thank you so much for the help. Let me look at this and see…

It seems that what @Fabian has suggested is the way to go IF your documents are stored in a Google Drive folder. it appears that is the only Folder source that is supported at the moment.

1 Like

I don’t see “Documents on Google Drive” anywhere. What about Onedrive? Is that an option?

And - btw - no the documents are NOT stored in ANY cloud. They are in a shared drive in my companies server - this is where all employees dump that info. They want me to get it (pdf) and allow the user to print that pdf - inside the folder of the shared drive.

At the moment, you cannot yet use an AppSheet app to select files in folders on a local network server to view, print or attach to an email. They would have to have been added into the app first.

AppSheet seems to be moving in that direction by allowing such a search and find against Google folders. By the way, the screenshot I included is presented after clicking on the Add Table button.

If it is necessary to gain access to those files from the AppSheet App, is there anyway they could be moved to Google or a copy placed on Google where the app can gain access to it?

If not, then I’ll have to rely on others to respond with any know workarounds.

1 Like

I am doing JUST that - moving to Google. Only problem is - they are updated daily. Meaning - new invoices are loaded daily. So looks like ill be copy and moving daily. Thanks for the help…

Question - I loaded a test file/folder. How Do I print pdfs from it?
I have files inside folders - It did not drill down - is it suppose to?

Did you try applying the suggestions from @Fabian 's post above? I haven’t tried it out yet myself.

1 Like

Let me go back and look. Thanks…