5 Replies Latest reply on Jul 13, 2017 11:31 PM by slaekke

    OR in relationship?

    slaekke

      Hi. Is it possible to get an OR in a relationship?

        • 1. Re: OR in relationship?
          philmodjunk

          Yes, but not by double-clicking a relationship line.

           

          If you set a text field to a list of values separated by returns and use it as your match field, records on the other side of the relationship will match if they equal any one of the listed values.

           

          A join table could also be used to get the same results.

          2 of 2 people found this helpful
          • 2. Re: OR in relationship?
            beverly

            The Multi-line key is an "OR", yes. But I might reserve the "OR" to the filtering of a portal if the multi-line key seems unnecessary (it's another field to be created and populated and relationship linked). YMMV & I've used both methods.

             

            If there is not an idea for "OR" in the relationship graph, there should be.

            Beverly

            1 of 1 people found this helpful
            • 3. Re: OR in relationship?
              FileKraft

              de Morgan’s Law

               

              A B = ¬ ( ¬A ¬B )

               

              • 4. Re: OR in relationship?
                gofmp15

                You could create a second id field that is a calculation based on your question and make that your join field. This gives you two join fields in the parent file and may simplify your thinking elsewhere.

                 

                Set your relationship to the x in the little box which means no values show all

                 

                The set a filter in your portal for you statement above. 

                 

                It would be two steps

                case( a value in either field or both fields

                id =x and status = y; id field

                id=x and status  = w ; id field

                ""

                )

                 

                This calculated field will contain the id field id whenever one of the two values (OR) are met and make it empty if neither is met. It also works when the first value is met AND the second value is met so further:

                 

                case(   we want a value in only one of the fields

                id =x and status = y; id field and status not w

                id=x and status  = w ; id field

                ""

                )

                1 of 1 people found this helpful
                • 5. Re: OR in relationship?
                  slaekke

                  I did go for philmodjunk solution with a autoenter textfield with returns that separate the values I need to show.