Jump to content
Salesforce and other SMB Solutions are coming soon. ×

automatic file name for .pdf


rick0001
 Share

Recommended Posts

Hi there;

 

can anyone help me with a maybe simple question.

 

I'd like to print a layout to a .pdf file and have the filename automatically set i.e. "customerID & date/time".

 

Thanks Rick

Link to comment
Share on other sites

  • 5 months later...

Hi there;

 

For example:

I use my estimate number (kp_estimate) as part of the filename.

First I declare the local variable "$filename" and use it than for my print routine.

 

In the script:

 

Set variable [$filename; Value:"filewin:/C:/pdf/" &ESTIMATES::kp_estimates &".pdf"]

 

Save Records as PDF {Restore; No dialog; "$filename", Current record]

 

hope that is of any help ....

Link to comment
Share on other sites

I notice you both are on different platforms ... instead of hardcoding filewin, you might want to determine the platform:

 

Set Variable [ $pathPrefix ; If ( PatternCount ( Get ( SystemPlatform ) ; 1 ) ; "filemac:" ; "filewin:" )

 

... then use $pathPrefix in place of filewin.

Link to comment
Share on other sites

Hi Everyone,

 

This was also suggested to me by another filemaker user:

 

Set Variable [ $Counter ; 0 ]

Go To Record/Request/Page [ First ]

Loop

Set Variable [ $Counter ; $Counter + 1 ]

Set Variable [ $path ; Case ( Abs ( Get ( SystemPlatform )) = 1 ; "filemac:" ; "filewin:" ) & Get ( DeskTopPath ) & "Week " & $Counter & ".pdf"]

Save Records As PDF [ Restore ; No Dialog ; "$path" ; Current record ]

Go To Record/Request/Page [ Exit After Last ; Next ]

End Loop

 

Thanks for all your help.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use