5 Replies Latest reply on May 13, 2014 11:43 PM by erolst

    Hide when...OR

    bigtom

      I have a popover button that I only want visible when the proper text is in a certain field. There are only two cases for this to happen. I am having trouble with the proper boolean expression I guess.

       

      I have TableName::FieldName ≠ "Text1" working in the hide object section. However, (TableName::FieldName ≠ "Text1" or TableName::FieldName ≠ "Text2") is not working.

       

      What am I doing wrong here?

        • 1. Re: Hide when...OR
          user19752

          Use 'and' instead of 'or'

          or,

          not ( TableName::FieldName = "Text1" or TableName::FieldName = "Text2" )

          will fit for you.

          • 2. Re: Hide when...OR
            bigtom

            For the time being I have duplicated the Popover button with one condition each, but there should be a way to do this with the correct expression I hope.

             

            Crossed post.

             

            Message was edited by: bigtom

            • 3. Re: Hide when...OR
              bigtom

              Why 'and' instead of 'or'?

               

              The

              not ( TableName::FieldName = "Text1" or TableName::FieldName = "Text2" )

              does work, but it seems like the same thing in a different way. I am curious why what I had was not working.

              • 4. Re: Hide when...OR
                Malcolm

                I have a popover button that I only want visible when the proper text is in a certain field. There are only two cases for this to happen.

                 

                If complex boolean equations give you headaches, use Case(). The following equation returns a true result unless field  equals either A or B.

                 

                Case (

                field = A ; 0 ;

                field = B ; 0 ;

                1

                )

                 

                Malcolm

                • 5. Re: Hide when...OR
                  erolst

                  bigtom wrote:

                   

                  Why 'and' instead of 'or'?

                   

                  The

                  not ( TableName::FieldName = "Text1" or TableName::FieldName = "Text2" )

                  does work, but it seems like the same thing in a different way. I am curious why what I had was not working.

                   

                  Because according to Boolean logic,

                   

                  not ( TableName::FieldName = "Text1" or TableName::FieldName = "Text2" )

                   

                  is the same as

                   

                  not TableName::FieldName = "Text1" and not TableName::FieldName = "Text2"

                   

                  as

                   

                  he_is ( not ( Harry or Larry ) ) = he_is not Harry and he_is not Larry

                   

                  shows in a (maybe) more intuitive way.