3 Replies Latest reply on Feb 17, 2012 8:00 AM by philmodjunk

    Printing Related Records is Printing "ALL" Records

    EmmettOliver

      Title

      Printing Related Records is Printing "ALL" Records

      Post

      Hi all,

      I have the following script (see attachment ) that was working correctly in the past, but now it is printing all records with the checkbox selected even when the records are from unrelated cases.  I've checked the kf_Family ID on all the records (there are only 8) and there are unique ids, but for some reason the script is now printing any child record with the print select checked no matter what the kf_FamilyID.

      The only thing I have been working on is the privilege sets and in that case only creating new accounts.  It doesn't matter if I'm logged in with full access or a privilege set with limited access, now it will print all records instead of just the related records. 

      Thanks, Emmett

      Printing_Script.JPG

        • 1. Re: Printing Related Records is Printing "ALL" Records
          philmodjunk

          The relationship is Family::__pk_FamilyID = Child::_fk_FamilyID?

          And the script is performed from the layout shown behind the dialogs in the above screen shot?

          Don't see anything wrong with the script.

          What kind of values are being entered in the two familyID fields. You don't by anychance have more than one value, separated by returns, entered in to the same field? (Might have to click into the fields to see such additional values) That seems very unlikely here, but cant' imagine any other cause here except maybe a damaged index on one or both of the ID fields.

          Damaged indexes can be rebuilt:

          To rebuild the index of a single field:

          1. Open Manage | Database | Fields and double click the field
          2. Use either the storage tab or the storage options button to turn off indexing.
          3. Exit Manage | Database, then return and turn indexing back on.

           

          You can also rebuild all your file's indexes by importing all the data into an empty copy (clone) of your file.

          If you have FileMaker 11, you can use Advanced Recovery options to rebuild your file's indexes:

          1. With the file closed, select Recover from the File Menu.
          2. Select "Use advanced Options"
          3. Select only: "Copy File Blocks as-is" and "Rebuild Field Indexes Now".
          • 2. Re: Printing Related Records is Printing "ALL" Records
            EmmettOliver

             Hey Phil,

            The answer to both of your questions is "yes".  The crazy part is that it worked before as designed.  So, I didn't re index anything but went into the script and made the changes on the attachment below.  I know I didn't have it checked before because I went into older files that I copied, but anyway it works now.  So, is that correct? Or, should I re index the file as well?

            Thanks, Emmett

            • 3. Re: Printing Related Records is Printing "ALL" Records
              philmodjunk

              Yep that's the issue, I'm so used to automatically selecting "Show only related records" I didn't even consider the possibility that you haven't selected it. Glad you found the issue.