9 Replies Latest reply on Sep 25, 2014 7:09 AM by philmodjunk

    printing of selection of related records

    willem67

      Title

      printing of selection of related records

      Post

      I use portals to show related records with many-to-many relations. I can print the related records using the go-to-related-records-script and the list-view-layout. This all works very well,

      However, now I would like to print only a selection of these related records. E.g. records that have been marked with a tick box.

      [I know that you can filter portals, but this does not effect the printing of related records....]

      What to do?

        • 1. Re: printing of selection of related records
          philmodjunk

          After the Go to Related records step, have your script:

          enter find mode
          specify the value for your tick in your tick box field
          Constrain the found set.

          • 2. Re: printing of selection of related records
            willem67

            Well, your solution seems logical and I tried it before, but I just get all related records....

            • 3. Re: printing of selection of related records
              philmodjunk

              Then something was not specified correctly in either your script or your relationship. If you share the details of your script and design, it's possible that we might be able to spot and correct the issue.

              And note that, depending on your layout design, modifying a field in the table of related records may create issues for you if it is ever possible that two users might try to select different sets of records from the same set of related records. But there are ways to avoid that issue that select the related records without modifying data in them that can keep one user's selections separate from another's.

              • 4. Re: printing of selection of related records
                willem67
                Does this make sense?
                 
                 
                 
                RELATIONSHIP
                EVENTS      +       join_EVENTS_documentation        +       events_DOCUMENTATION
                 
                EVENT_PK          =>     event_FK
                                        documentation_FK     <=        DOCUMENTATION_PK    
                 
                 
                SCRIPT

                New window [+name, details, etc.]

                Go to related records [only related records; table "join_EVENTS_documentation"; with lay-out: "EVENTS_REPORT_bibliography" (join_DOCUMENTATION_events)]

                Sort records [+details]

                Print settings [+details]
                Go to print screen []
                • 5. Re: printing of selection of related records
                  philmodjunk

                  Are the two names shown in blue, two different occurrences of the same data source table?

                  Are you trying to pull up records from the join table or events_DOCUMENTATION?

                  Go to related records [only related records; table "join_EVENTS_documentation"; with lay-out: "EVENTS_REPORT_bibliography" (join_DOCUMENTATION_events)]

                  And where are the script steps to do what I recommended?

                  Enter find mode
                  Specify search criteria that selects which records in join_events_documentation that you want to print
                  Constrain Found set (This must be constrain found set, perform find will produce the wrong result.)

                  • 6. Re: printing of selection of related records
                    willem67

                    First of all: all your suggestions were excellent!

                     

                           
                    1. Answer: where are script steps? I forgot to mention that it was the script before the feature of printing a selection of related records.
                    2.      
                    3. My relations were good. However, I used for the lay-out of my report the wrong join-occurrence. That did not give a conflict, until I wanted to add my new feature.
                    4.      
                    5. In stead of adding the go-to-find-mode is use now directly the constrain found record step. It seems that if you use the go-to-find-mode and perform a search, it searches all records, instead of only the related records of one specific record. The constrain-step limits itself to the related records only.
                    6.      
                    7. Now it works.

                    Thank you.

                     

                     

                    • 7. Re: printing of selection of related records
                      philmodjunk

                      Go to find mode simply enters find mode. If you then constrain found set, it should work.

                      Perform find, on the other hand might produce the issue you describe.

                      But the scripted find I had in mind was patterned after the examples found here: Scripted Find Examples

                      • 8. Re: printing of selection of related records
                        willem67

                        True.

                        But if you use first the go-to-related-records-step of one record and then the go-to-find mode, it seems it does not do only a search within the found related-records of that one record?

                        • 9. Re: printing of selection of related records
                          philmodjunk

                          To repeat, that is not the case.

                          Compare your file to this one: https://dl.dropboxusercontent.com/u/78737945/GTRRwConstrain.fmp12

                          In it a script uses GTRR to pull up all the records in the portal, then enters find mode, specifies "red" in the color field and uses constrain found set to reduce the found set to just those records in the portal that had "red" in the color field.