4 Replies Latest reply on Aug 6, 2015 8:05 AM by MichaelWile

    Relationship problem



      Relationship problem


      I have a solution that has 364 matching book codes. On a layout, I defined a relationship where the bookcodes of the PRODUCT and the ELEMENT must match AND the IT_Project_FLAG and Add2Nav fields must match. All 364 records have matching bookcodes. Of the 364 records, 2 have the Add2Nav field set to one. The rest are empty. The PRODUCT::IT_Project_FLAG is NOT set on any records but the 2 records with the Add2Nav fields set to 1 show up anyway. Both bookcode fields are Text and the Add2Nav and IT_Project_FLAG fields are set to number.

      Any ideas on why these 2 records are showing up when there is no relationship? Thanks.


        • 1. Re: Relationship problem

          You'll need to describe the layout where they "show up anyway". Is this a layout based Product, Element_Nav2 or some other table occurrence? Are they showing up in a portal? If so, a portal based on what table occurrence?

          Note also that a relationship cannot match null values in the match fields so you will also need to assign a value (perhaps 0?) to the fields where the match field is currently empty.

          • 2. Re: Relationship problem

            The layout is based on Element_Nav2. No portal.

            I'll go through the 272,000 records and change any empty values to zero first and give that a try.


            • 3. Re: Relationship problem

              The null values are not the immediate problem. Null values don't match to anything.

              Given the fact that you are looking at records from Element_Nav2 on a layout based on Element_Nav2, you will be able to see all records from Element_Nav2 no matter what relationships you define for that table occurrence. The portal is based on the table, not a relationship. A portal to those records, on the other hand, will use the relationship between the layout's table occurrence and the portal's underlying table occurrence to limit what records are currently visible.

              You can also perform a find to limit what records in the layout's table are visible.

              • 4. Re: Relationship problem

                I replaced the 5,630 null values in the PRODUCT table with "0" and the same with the 272,000 null values in the ELEMENT table. Also added a Boolean calc so those will always be 0 or 1. Success. It now shows no records when I uncheck the 2 values that were "1" from the Add2Nav field.