Help! When a new record is created, create a pdf file link

Greetings!

I been struggling to figure out this.

I have a records table with a column url type. I would like to have this column auto compute as url. I already created a bot and a template, “when a new record is created, make a new file” and the pdf file automatically save to appsheet data in drive. I want this pdf file link to automatically place in URL column of my table when a new record is created.

Thank you

1 11 1,227
11 REPLIES 11

Could you please include some details of how your PDF filename is generated - an example of the path its saved to and an sample filename will also help.

One thing to check is if you have the “Disable Timestamp” checked/turned on (see below). If not, and you have accepted the default, then the filename is created with a Timestamp embedded in it. You will NOT be able to create a URL to the file in this case as you can NEVER know, in an automated fashion, what the actual value of the Timestamp was when the file was created.

You will want to be sure this flag is ON!

3X_2_9_29b57c0ca147041ada58e34b683959dfe05a7159.png

Can someone suggest me a formula to my virtual column to auto generate a url everytime a record is created

Screenshot_20210816_211244|510x500

And what should i put in file path?

Thank you

@Eoj_VT
Do you mean you would like just to be able Open PDF file in your app or you need URL to file on G-drive

I want it to open in the app. And this url is unique for each record.

So it’s looks like you have to create virtual column (file type) and in formula field writing next CONCATENATE(“FOLDER PATH”, [LPO Number])

It’s have to be the same folder path like in workflow

You can make your custom folder path, example:
MyApp/ImportantFiles
So appSheet create folder ”MyApp” with subfolder “ ImportantFiles” All files will located in subfolder

Make sure you did that step Help! When a new record is created, create a pdf file link - #2 by WillowMobileSystems

Since your circled area in the image you provided is blank, AppSheet is using a default folder name. Look into your G-Drive to see what folder your files are being saved into and that is your folder path.

OR

Insert your desired folder path into that circled area in your file creation task.

Then in your Virtual Column, as @VOLODYMYR_TYROL suggested, change the column type to File and insert into the APP FORMULA to create your folder path + filename, a CONCATENATE() function but you’ll need it with the following modifications:

CONCATENATE(“FOLDER PATH/”, [LPO Number],".pdf")

There needs to be a “/” between the folder path name and the file name. The [LPO Number] column value you used in the file creation task is the file PREFIX only. You need to add the suffix based on the file generation type you selected - which looks to be PDF.

Let us know if these tips help.

Still doesn’t work this error shows when clicking the link

Heres my Virtual Column Formula

Here’s my file path virtual culumn

In my work flow formula

Any suggestions why an errors occurs? Just to add when I created a new file it goes directly to the drive folder of my work flow folder path. I think no issues with my work flow file path.

Did you switch off TimeStamp?

3X_1_0_1075ee50571226dd087b7d85868e4dadcc0e7a19.jpeg

What folder is your Google Sheet located in?

If you have placed it in the “/data/AdlitaAppSheet/2266752” folder (this is the normal default), you do not need to include that portion in your paths.

If the above is true, then change your expression in the [Lpo Url] column to:

CONCATENATE("GARAGELPO/", [LPO Number], ".pdf")

I am not clear what the File Path virtual column is for so I don’t have a recommendation for that yet.

For the Folder Path in your workflow, you only need the Folder name like so:

GARAGELPO

placed in the circled part of your image above.

Top Labels in this Space