AnsweredAssumed Answered

Using an OR statement to hide an object

Question asked by jdevans on Feb 3, 2016
Latest reply on Feb 3, 2016 by Vaughan

I have a button on a layout I'd like to hide to every account except for two. My logic was to use the "Hide object when" calculation engine.

 

When I set it to hide under the following condition, it works:

 

Get(AccountName) doesn't equal "AdminAccount"

meaning: it is visible to AdminAccount, but nobody else. (good)

 

But if I add a second account separating them with the word "or" like so:

Get(AccountName) doesn't equal "AdminAccount or

Get(AccountName) doesn't equal "user1"

 

the object disappears even for "AdminAccount"

 

Why doesn't this work?

 

BTW, I tried xor as well, and it still hides the object to either account.

 

NOTE: the actual code uses the not-equal-to symbol inside the calculation engine in place of "doesn't equal" above.


Also, I would've used Get(AccountPrivilegeSetName) but I would've had to do an or statement with that too, since the two users I want to SEE the object have different privilege sets.

 

Message was edited by: Dave Evans

Outcomes