6 Replies Latest reply on Jul 27, 2015 3:06 AM by MichaelWile

    Using "Hide object when"

    MikeWile

      Title

      Using "Hide object when"

      Post

      I’m trying to hide an object on a layout. I have a field that stores the AccountPrivilegeSetName (g_APSN) and one that stores a global field that holds an email address (g_UserEmail).

      I’m trying to hide it when the account privilege is not equal to [Full Access] or g_UserEmail is not Name1 or Name 2.

      I’ve tried “g_APSN ≠ “[Full Access]” and (g_UserEmail ≠Name1 or g_UserEmail ≠ Name2)”. I’ve tried other combinations, as well, such as using “not” and changing ≠ to = but it doesn’t hide. It only works when I use one of the parameters. What am I doing wrong?

        • 1. Re: Using "Hide object when"
          saigopaldas

          Hi,

          You can try “g_APSN ≠ “[Full Access]” or (g_UserEmail ≠ Name1 or g_UserEmail ≠ Name2)”.

           

           

          Thanks

          • 2. Re: Using "Hide object when"
            raybaudi

            Try:

            not (
            g_APSN = "[Full Access]"
            or
            g_UserEmail = Name1
            or
            g_UserEmail = Name2
            )

            • 3. Re: Using "Hide object when"
              philmodjunk

              Hmmm, all suggested solutions here should work. But so should Mike Wile's original expression, which actually matches one of the suggested solutions:

              g_APSN ≠ “[Full Access]” and (g_UserEmail ≠Name1 or g_UserEmail ≠ Name2)

              So you might just need to check:

              The data types of each field, they should be text.

              The values loaded into each global field--and make sure that they are really global as that's a mistake I've made myself.

              The precise details of your expression. You obviously are not using Name1 or Name2 in your expressions so a character wrong there or an extra space in the privilege set name would make all of these expressions fail.

              • 4. Re: Using "Hide object when"
                raybaudi

                But so should Mike Wile's original expression "g_APSN ≠ “[Full Access]” and (g_UserEmail ≠Name1 or g_UserEmail ≠ Name2)”

                I think that the "and" must be an "or" ( and that  differs our calcs from Mike Wile's original expresion )

                • 5. Re: Using "Hide object when"
                  philmodjunk

                  Good catch Raybaudi. I stand corrected. But if you find that the suggested changes still fail...

                  • 6. Re: Using "Hide object when"
                    MichaelWile

                    But so should Mike Wile's original expression "g_APSN ≠ “[Full Access]” and (g_UserEmail ≠Name1 or g_UserEmail ≠ Name2)”

                    I think that the "and" must be an "or" ( and that  differs our calcs from Mike Wile's original expresion )

                     

                    I thought I had tried both "and" and "or" but apparently I didn't. It works like a charm now.