PDF File link view

Hi, i have successfully created a Bot that Creates/Updates a PDF every time i Add a new row or Update an existing row.

The PDF files are stored in a google drive file properly. 

Issue: When i add a Virtual Column so i can view the downloaded PDF File, every time i add an additional row, im only seeing the First PDF File created.

They all have different IDs.

The issue is only in the App itself, in Google Drive they are good and different. 

0 9 125
9 REPLIES 9

The file name needs to be different each time you update the record. Otherwise it will read the first created from the cache.

Hi, the file names are different, the problem im facing is that, it opens a differently named file, not a previous version of this same file.

This happens just when adding a fresh new record, not when updating an existing record.

@Y_M_K

Would you like to try dbaum's tip that works for me. Create a new file open action... 

For the action's File property, concatenate the filepath/filename string with an ampersand and probably any text--potentially even hardcoded rather than dynamic.

[File] & "&" & UNIQUEID()

Example screenshot:

Denzil_Snyman_0-1709715205723.png

https://www.googlecloudcommunity.com/gc/Tips-Tricks/Open-a-file-action-get-current-not-cached-file/m...

 

A couple of things to recognize here. Although @AleksiAlkio and @Denzil_Snyman provide valuable information on unique file names, it is important to recognize that if the filename is constructed consistently and the file storage is Google Drive, then you can in fact just overwrite the file when creating a PDF for an onChange event. Ideally you should still use a filename that is unique to the data row so that the file does not have the same name for two or more different rows.

That said, I am interested in the formula that you are using in your virtual column. If you can share that, maybe we can assist further.

Hi, firstly, thank you all for the quick responses!

Im a bit confused about the reactions here so, im gonna share some screenshots of the app and the formulas im using, i have redacted some info, hopefully you can help me!

They are saved properly in Drive with different file names, however, in the app it always wants to open what was first created

Screenshot_20240306_111809_Chrome.jpgScreenshot_20240306_111818_Chrome.jpgScreenshot_20240306_111832_Chrome.jpgScreenshot_20240306_111843_Chrome.jpgScreenshot_20240306_112258_Chrome.jpg

I think your main issue is one that I experience myself using a system like yours. I create a PDF when creating a new record called INVOICES_FISCALYEAR_NUMBER like INVOICES_2024_1 then assign a file column value like you do using concatenate. If I make an edit to the row for this invoice, I create the PDF again using the exact same file name which when it gets 'uploaded' to Gdrive from Appsheet under the file folder for the app, actually updates the version of that file rather than creating a new file. So, when I am in my app and click on the file link (not a URL) it does in fact open up the 'old' version initially. I believe this has to do with the data cache with Appsheet applications. I have noted if I refresh the browser window and/or wait a while then subsequent clicks on the file link does in fact show the newer version of the file. I have not yet come up with an ideal solution to fix this delay of when the new version becomes available.

I have an additional issue when it comes to viewing the PDF in the app itself,  which the app doesn't wanna open the PDF in it, it gives me all other options instead..

Hi all, i don't know if this did the trick because I've tried this same thing in the past, but, now it works! It opens their respective PDF successfully! 

I did this formula in both places where needed (the bot and in the virtual column).

Screenshot_20240306_222919_Chrome.jpgScreenshot_20240306_223051_Chrome.jpg

Top Labels in this Space