` Printed Icetips Article

Icetips Article



Par2: Inner join displays repeated (parent) records
2002-06-07 -- Dennis Evans
 
> A browse on a primary file inner joined to a secondary file inner joined
> to a tertiary file retrieves only primary file records for which tertiary
> file records exist, but displays each record multiple times. So if there
> are 10 tertiary file records for a particular primary file record, the
> primary file record is listed in the browse 10 times. I only want it
> listed once. What do I have to do? TIA.


   you have two main options, use the ValidateRecord method and do some
control break processing or write a function, bind it and return '1' or '0'.

  Using the ValidateRecord method,

  add a local variable to the method that is the same type and size as the
link field.  Add the static attribute.

  in the ValidateRecord method, after the parent call,

  if (OldValue = CurrentValue)
     ReturnValue = Record:Filtered
  end
  OldValue = CurrentValue

  Using a bound function is about the same, just write the function to do
the same thing and then return a string value of '1' or '0', bind the
function and then add it to the filter.

    Note, both of these methods can be used to create summary browses that
display totals for related files



Printed May 10, 2024, 7:29 am
This article has been viewed/printed 35119 times.