3 Replies Latest reply on Jul 7, 2014 6:26 AM by philmodjunk

    Object visibility

    rudihoremans

      Title

      Object visibility

      Post

           Depending on the value of a field (Field A) a pop-up button should be visible or not. If "Field A" = "X", the button should be visible. So I define in Inspector/Hide object when: Field A ≠ "X". When "Field A" = X, the popup button is visible.

           So far so good. I have another popup button that should only be visible when "Field A" = "Y" or when "Field A" = "Z".

           I tried to define the calculation for hiding the object as follows: 

           Inspector/Hide object when: Field A ≠ "Y" or Field A ≠ "Z". When "Field A" = Y or when "Field A" = "Z", the popup button stays hidden.

           I am afraid the solution is that obvious that I simply fail to see it. As I have a dozen popup buttons that should only be visible if a condition (and several of them have this second scenario: two or more possible values if "Field A" should trigger the same popup visibility) in "Field A" is met, I dearly would like to find a way to make this work.

            

        • 1. Re: Object visibility
          philmodjunk

               Field A ≠ "Y" or Field A ≠ "Z"

               Will always be a true expression and thus your button is always hidden by the "hide object when" property.

               Try:

               Field A ≠ "Y" and Field A ≠ "Z"

          • 2. Re: Object visibility
            rudihoremans

                 Failsafe. Thank you.

                 Still seems odd, like there's an operator missing in the expression.

                 "Hide object when" Field ≠ "Y" and Field A ≠ "Z" in verbose language means then:

                 hide object when Field A ≠ "Y" OR when Field A ≠ "Z" --- or:

                 hide object when Field A ≠ "Y" AND ALSO hide object when Field A ≠ "Z"

            • 3. Re: Object visibility
              philmodjunk

                   Think it through.

                   If Field A  = "B", you get True or True which evaluates as True

                   If Field A = "Y", you get False or True, which evaluates as True

                   IF Field A = "Z", You get True or False, which evaluates as True

                   Pick any value for Field A that you care to choose and run the same analysis and you'll get a True result.

                   Now try the same tests using And as the operator and note what happens.