2 Replies Latest reply on Sep 14, 2011 4:57 AM by KristineZoltek

    RE:  Saving a Record to the Desktop Using a Fieldname

    KristineZoltek

      Title

      RE:  Saving a Record to the Desktop Using a Fieldname

      Post

      Hello, I'm a beginner at scripting and I'm trying to write a script that saves a record to the desktop as a pdf file using a field name from the database.  My script is as follows:

      Go to Related Record [Show only related rocords; From table: "ClearanceDatabase"; Using layout: "Packet1" (ClearanceDatabase)]

      Set Variable [$PacketName; Value:Get (DesktopPath) & ClearancePacketRequest::PDFName & ".pdf"]

      Save Records as PDF [Restore; No dialog; "$PacketName"; Automatically open; Current record]

       

      My file path in the Save Records as PDF step is:

      filemac:/Desktop/$PacketName

       

      and when I run the script I get an error that says $PacketName (no quotes here as the file name is correct as per the field in the database I'm naming it after) could not be created on this disk.  Use a different name, make more room on the disk, unlock it or use a different disk.

      Any ideas as to what I may be doing incorrectly?

      Kristie