3 Replies Latest reply on Jul 14, 2015 7:18 AM by philmodjunk

    Portal Printing Issue

    rtolliver

      Title

      Portal Printing Issue

      Post

      I'm having an issue with viewing the correct record information in a print layout whenever the print record button (script is attached) is selected.  The issue is not with the printed information, that's correct. When the script step enters Preview mode the first records data is always displayed regardless of the portal record that's selected.

      I need help with identifying the problem.

       

      Screen_Shot_2015-07-13_at_3.25.34_PM.png

        • 1. Re: Portal Printing Issue
          philmodjunk

          There are two basic print options that have been part of FileMaker since at lest 2.5: Records Being Browsed and Current Record. When you enter Preview Mode, FileMaker previews the entire found set--just as though you were going to print with the Records Being Browsed option. You can either navigate to the same page as your current record or limit your found set to just the current record before entering preview mode.

          The following script steps, can isolate the current record in a found set of 1 record:

          Set Variable [ $Key ; YourTable::primaryKey ]
          Enter Find Mode []
          Set field [ YOurTable::PrimaryKey ; $Key ]]
          Perform Find []

          • 2. Re: Portal Printing Issue
            rtolliver

            I follow what you have suggested in the script steps but I can not use the table's primaryKey because it is not a unique value, I would have to use another field.  Also, are your script steps suppose to replace "Go to Related Record"?

            • 3. Re: Portal Printing Issue
              philmodjunk

              If it is not a unique value, it is NOT a primary key. Use any value that uniquely identifies each record in the table. These steps would take place immediately after the go to related records step.

              Note:

              Show All Records
              Omit Record
              Show Omitted Only

               can also isolate the current record, but this can fail on very rare occasions if another user were to create a new record in the same table at just the wrong split second instant in time...