7 Replies Latest reply on Jan 8, 2013 7:16 AM by philmodjunk

    Further Filtering Related Records

    alanfair

      Title

      Further Filtering Related Records

      Post

           I have used the Go To Related Records , function to provide a list of related records,

           However I need to then filter this list further, including only records where a field has a particular value. for examply field "A" is not empty.

           I am not sure how to apply this additional filter.

           When i have my final list I will output the result to a report.

           So how do i apply a filter to remove releated records i dont want in my report. 

           Many thanks

            

        • 1. Re: Further Filtering Related Records
          philmodjunk

               Have your script do this after the Go To Related Records step:

               Enter find mode
               Specify find criteria
               Set errror capture on
               Constrain found set  ---> use this option to apply the criteria only to the records in your found set to "filter" your found set.

          • 2. Re: Further Filtering Related Records
            alanfair

                 Many Thanks

                 Do you have a simple example of a script using find mode

                 Alan

                  

            • 3. Re: Further Filtering Related Records
              philmodjunk

                   See this thread: Scripted Find Examples

              • 4. Re: Further Filtering Related Records
                alanfair

                     Thanks i have tried this, and my script generated the following error, 'This action cannot be performed because the field is not modifiable'.

                     Here is my script below.  Basically i am trying to filter so i just have records with an image in them ie, somthing in the  date::d_image field (which is a container).

                     Help............

                • 5. Re: Further Filtering Related Records
                  alanfair

                       OK, resolved this by using a calculated field to check the container and then filtering on the container , however this now generated another issue.

                       Prior to setting up the find, my report worked ok, in that it displayed all the related inspection records within the data table. The fine was to further reduce the selection so only related records that had an image were displayed.

                       I assumed that the find worked with what was already selected., however when i apply the find , i now only get record with an image, (as wanted, but it includes non releated records, it basically finds all records in the data table file with no image.

                       So it appears its not working with my initial data of related records.   Have I missed a step, of is this behaviour correct.

                       Alan

                        

                  • 6. Re: Further Filtering Related Records
                    alanfair

                         see leave me long enough and i work this out.

                         Did not need the perform find line in the script, was gettign confued between examples

                          

                         Thanks

                          

                    • 7. Re: Further Filtering Related Records
                      philmodjunk

                           Yes, but nothing in your script would trip the error you report. Something else--possibly a trigger controlled script was trying to modify a field while in browse mode to produce that error message.

                           Did not need? More specifically, you need to replace it with the constrain found set step.