2 Replies Latest reply on Apr 29, 2015 7:52 AM by jdevans

    scripting to create new record with pdf of found set in container field

    jdevans

      Title

      scripting to create new record with pdf of found set in container field

      Post

      I am struggling to make one last part of my script perform as desired. I have a layout where employees enter time for a timecard system. Once they have all their time in for a week, they click a button on the data-entry layout.

      The button runs a script that is supposed to:

      1) go to printable layout (found set and sorted)

      2) make a pdf of the view

      3) go to new layout based on table that serves as a dropbox called "signed timesheets"

      4) create a new record in signed_timesheets and place the pdf inside a container field there.

      Everything works, except when the record in signed_timesheets is created, and the pdf is put in the container field, the pdf isn't interactive. The file is there, but you can't do anything with it other than export it.

      If I go to the signed_timesheets layout and manually create a new record, with the New Record button, and then right-click the container field, placing a pdf into it, THIS pdf is interactive. Yet the one created and inserted during the script is not interactive.

      I want the user to be able to go to that layout, and use Adobe's Signature tool to sign it with a digital ID.

      This works with the manually created pdf, but the records created using the script are inactive. I don't know what to do to fix it.

      Here is the part script steps that are being used now>>>

      Save Records as PDF [ File Name: “filewin://FILEMAKER-SRV/FM Temp/TimesheetPDFs/timesheet.pdf” ; Automatically open ; Records
      being browsed ]
      [ Document - Title: $$employee_id; Compatibility: Acrobat 7 and later ]
      [ Pages - Number Pages From: 1; Include: All pages ]
      [ Security - Printing: High Resolution ; Editing: Any except extracting pages ; Enable copying ; Enable Screen Reader ]
      [ Initial View - Show: Pages Panel and Page ; Page Layout: Single Page; Magnification: 100% ]
      [ Restore ]
      Go to Layout [ “SIGNED_TIMESHEETS” (SIGNED_TIMESHEETS) ]
      New Record/Request
      Insert File [ SIGNED_TIMESHEETS::container_pdf ; “filewin://FILEMAKER-SRV/FM Temp/TimesheetPDFs/timesheet.pdf” ]

      Untitled.png