0

Change the default file name when using Print PDF

Hi, 

When I click Print PDF I get the the file downloaded with the name stuctured as follows:

[TABLENAME][ID]

Is it possible to chnage this so it uses a different name structure such as:

[TABLENAME][TEXTFIELD]

Hope someone can help.

9 replies

null
    • Emanuel_Neubert
    • 5 yrs ago
    • Reported - view

    Hi,

    you can create a button and print into pdf (file attachments) using following syntax:

     

    importFile(this, printAndSaveRecord(this, "Layoutname"), "Filename.pdf")

     

    Regards Emanuel

    • Choices_Software_Dean
    • 5 yrs ago
    • Reported - view

    How can the same button code be altered to also open the attachment?

    • Craig
    • 5 yrs ago
    • Reported - view

    Cant thank you enough for that! Works a treat, I am going to add a selection so I can quickly choose a layout to print as there is a few available on each record but this is great, thanks again!! :)

    • Emanuel_Neubert
    • 5 yrs ago
    • Reported - view

    Hi Westy,

     

    this is not possible yet.

     

    Emanuel

    • Agassi
    • 5 yrs ago
    • Reported - view

    Hello!

    This is a great solution to import that file directly to Ninox.

    But what would be the code to save it on your PC rather then import in Ninox? 

    • Jorg
    • 5 yrs ago
    • Reported - view

    Hi Agassi, 

    You can only import and save it directly in the Ninox database with a code.

    We have already planned to make it also possible to save attachments also on your device. 

    Thank you for your patience.

    Greetings, Jörg

    • Agassi
    • 5 yrs ago
    • Reported - view

    Jörg, thank you for the answer!

    Actually,  for me important is not to save the file on  pc via code, but to save it with configurable name. Like now, by clicking the print button. 

    • Ninox partner
    • RoSoft_Steven.1
    • 5 yrs ago
    • Reported - view

    Agassi,

    this is the syntax to achieve that:

    importFile(this, printAndSaveRecord(this, "My Print Layout"), "mypdf.pdf")

    or

    importFile(this, printAndSaveRecord(this, "My Print Layout"), 'Own Name field'+".pdf")

    The file will be saved in the attachement tab.

    Steven.

    • Agassi
    • 5 yrs ago
    • Reported - view

    Steven, thank you!

    Because of my English I did not construct the frase correctly maybe. 

    I was looking for a way to save the file with a custom filename to local folder on my pc,  not in Attachment tab in Ninox.

    Anyway, thank you for your help! I guess what I want is not possible yet.

Content aside

  • 5 yrs agoLast active
  • 9Replies
  • 3627Views