PDF file does not open in form view

Hi everybody,

In my appsheet form I have created an action to generate Pdf file and send it via email.The process is working ,but when I try to open the file in my form it gives strange message:

<html>
        <body style="margin:20px">
          <div>&#39;Attachments/ALI.pdf&#39; not found</div>
          <div>Probable cause: N/A</div>
          <div><ul><div>
   <div>Path: Root</div>




























<div>Result: FAILURE</div> <div>Message: N/A</div> <details> <ul> <li><div> <div>Path: Root</div> <div>Result: FAILURE</div> <div>Message: N/A</div> <details> <ul> <li><div> <div>Path: Root</div> <div>Result: Success</div> </div> </li> <li><div> <div>Path: Root</div> <div>Result: FAILURE</div> <div>Message: N/A</div> <details> <ul> <li><div> <div>Path: Root</div> <div>Result: Success</div> </div> </li> <li><div> <div>Path: Root</div> <div>Result: FAILURE</div> <div>Message: N/A, Searching for &#39;ALI.pdf&#39;, File entry not found</div> <details> <ul> </ul> </details> </div> </li> </ul> </details> </div> </li> </ul> </details> </div> </li> </ul> </details> </div> </ul></div> </body> </html>

 My file path in google drive is:appsheet/data/APB/Attachments....."the File".I used this expression in my file generation:concatenate("Attachments/",[Name],".pdf").

Your assistance is higly appreciated

Solved Solved
0 14 260
1 ACCEPTED SOLUTION

add a &".pdf" to the right of this expression

Rafael_ANEICPY_0-1714272003361.png

and disable the timestamp

Rafael_ANEICPY_1-1714272027151.png

 



View solution in original post

14 REPLIES 14

Hello there,

The "file" column must be populated with a concatenation of this:


@eldderri wrote:

appsheet/data/APB/


and this:


@eldderri wrote:

concatenate("Attachments/",[Name],".pdf")


It is not enough to save in the "file" column the name of the file, you need to provide the full root folder directions.

Hello. You must yo create a virtual column with this funciรณn:

CONCATENATE(
  "https://www.appsheet.com/template/gettablefileurl",
  "?appName=", ENCODEURL("MetaFX20-xxxxxx"),
  "&tableName=", ENCODEURL("COTIZAR"),
   "&fileName=Files/", ENCODEURL([PKID] & ".pdf")
)

Pay close attention to the path of the PDF file, that sometimes causes issues. In the example, the file is located in Appsheet/data/MetaFX20-xxxxx/Files.

 

 

Hi friends,

Both solutions do not seem to work .

I have this in my Pdf generaation action :concatenate("appsheet/data/APB//APB/Attachments/",[Nom & Prรฉnom],".pdf")

The generated PDF file  is loacated in Attachments

The table used in my app is located in "data".

Any solution?

Look into the folder path to the PDF that is being saved into the row, and go into the folder as well in your google drive, make sure that they match EXACTLY

In my Googlesheet when I enter data ,it displays :

/appsheet/data/ABP/Attachments/ALI.pdf

eldderri_0-1714252143313.png

 

In File column in appsheet ,I have this:

concatenate("/appsheet/data/ABP/Attachments/",[Nom & Prรฉnom],".pdf") .

eldderri_1-1714252206213.png

This expression is also used in my action to generate PDF and send email.

eldderri_2-1714252260375.png

What could be the reason of this failure?

In your automation what is the expression for the name of the document being generated?

Here is .It is the same:

eldderri_2-1714252559528.png

 

No, I mean the name given to the document itself, that's the name you're storing in the google sheets, they are not the same

eldderri_0-1714254407055.pngeldderri_1-1714254493222.png

The googlesheet file is named "Best Practice and Activity"

No, here's the situation

When you create a PDF you create 2 separate file names: 

1. You save the folder address and the name of the document concatenated together into your google sheets

2. You save the document with just a name and the extension ".pdf" in one of these (depending if you're just creating a file or sending it via email and then saving it as well)

Rafael_ANEICPY_0-1714254876033.png

Rafael_ANEICPY_1-1714254893819.png


These 2 steps must match perfectly for AppSheet to be able to find the document following the path you created in 1.

So my question is, what is the expression you're using for 2.?

Based on your question,I missed a step in my automation :

I have this in my automation process:

 

eldderri_1-1714257021212.png

If you want I give you access to my app for some time to figure out where the problem is

add a &".pdf" to the right of this expression

Rafael_ANEICPY_0-1714272003361.png

and disable the timestamp

Rafael_ANEICPY_1-1714272027151.png

 



Good morning,

It worked now.You were right .Thank you so much for your kind assistance .

Best regards,

 

 

No problem, please mark the reply that solved your question as the "solution" so others in the future who might have the same issue can find it more easily, thank you

Top Labels in this Space