Adding link to a template

During the creation of a request, the user can upload files using the column with the file type. We also have a template for the PDF document (workflow rule), which displays all the information about the request. We want the names of user files in this pdf to be clickable, and when you click on them, a new window with this file opens. We have the following formula for file link, but it doesnโ€™t work (we get error # 404). What could be wrong?

How it should look like:
3X_d_3_d3eee43cc4864b7e3c0f8392cc8fb8c4436178b4.png

What we get clicking the file name:

UPD:
Seems that Appsheet generates a link with two extra digits. without them, the file opens. Perhaps the slash sign โ€˜/โ€™ from the file path is not encoded correctly. How to fix it?

0 3 159
3 REPLIES 3

Dont URL encode a URL

You only really need to include that if youโ€™ve got special characters. If everything is already a string that youโ€™re concatenating together - with no / . { } () etc. - then thereโ€™s nothing to encode.

So inside your manually constructed file link - you could remove all the ENCODEURL() parts I think.

  • Dashes are acceptable in a URL, so are underscores; and the URL is already a URL.

But the files are store in the folder called โ€œMRS_Attachment_Filesโ€, so the fileName part in url looks like MRS_Attachment_Files/filename. Please correct me if Iโ€™m wrong.

You are correct in this - so you would need to ENCODEURL() that forward slash.

Top Labels in this Space