Skip to main content
Question

File Name for PDF attachments

  • December 23, 2024
  • 0 replies
  • 389 views

Forum|alt.badge.img

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?

 

Forum|alt.badge.img+20
  • Quickbase Alumni
  • January 2, 2025

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


SSNJeffP
Forum|alt.badge.img+11
  • Quickbase Alumni
  • January 3, 2025

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)


JimHarrison
Forum|alt.badge.img+16
  • Quickbase Alumni
  • June 13, 2025

adding momentum to mikes brilliant idea, go vote!!