Forum Discussion

LawrenceFu's avatar
LawrenceFu
Qrew Member
23 days ago

File Name for PDF attachments

I'm creating a reoccurring notification with a PDF attachment.  The attached file name is only showing as "document-1".  The pdf is created through the document template and I'm able to already save it with a specific file name.  

How do I change the file when it's sent out as a PDF attachment with the notification?

 

  • There is currently no way to name it. There is feedback for this and they are gathering input, so upvote it! I already did. We really need to be able to name the file.

    https://feedback.quickbase.com/app/#/case/442341?cpid=b275a097-c042-49f4-94a8-81e35eecee20

  • If you're using the formula URL method to generate the document, you can set the filename there. Below is the example code for the button:

    var number recordId = [Record ID#]; //record ID# you want you are generating the document from
    var number templateId = 1; //ID of the template you'd like to generate
    var text tableId = Dbid(); //tableID of the table the template was built in
    var text fileName = "myqbdoc"; //name of the generated file
    var text format = "pdf"; //output formats: html, pdf, docx
    var text qbRealm = NotRight(NotLeft(URLRoot(), 8), "/") ; //gets the current realm, required for API requests


    "https://api.quickbase.com/v1/docTemplates/" & $templateId &"/generate?&tableId=" &
    $tableId & "&realm=" & $qbRealm & "&filename=" & $fileName & "&format=" & $format
    &"&recordId=" & ToText($recordId)

    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander

      Jeff,

      Unfortunately this only works to rename the file if you use their custom Formula URL button. When using a custom notification and attaching the document template, it creates the name document-1.pdf, and this name cannot be changed at this time.

      Upvote if you get a chance! It's actually more important to be able to control the name when attached to an email, in my opinion.