wattmhite Posted April 4, 2017 Posted April 4, 2017 I'm trying to hide a tab from all but the following users, Matt, Haley and Kristen. I'm trying to use the hide object when- (Get ( AccountName ) ≠ "matt") or (Get ( AccountName ) ≠ "haley") or (Get ( AccountName ) ≠ "kristen") but its not showing even to me at the moment. Any idea what I am doing wrong or a better way to go about this? Thanks
comment Posted April 4, 2017 Posted April 4, 2017 (edited) Your expression is a tautology, because if the current user is Matt, then it isn't Haley - so at least one of the OR'ed statements will always be true. Try instead: Get ( AccountName ) ≠ "matt" and Get ( AccountName ) ≠ "haley" and Get ( AccountName ) ≠ "kristen" or (same thing): not ( Get ( AccountName ) = "matt" or Get ( AccountName ) = "haley" or Get ( AccountName ) = "kristen" ) or shortly: IsEmpty ( FilterValues ( Get ( AccountName ) ; "matt¶haley¶kristen" ) ) --- Of course, a better solution would be to assign Matt, Haley and Kristen to a different privilege set, and base the test on that. Then you won't have to remember to modify your layout every time you make changes to the staff. Edited April 4, 2017 by comment 1
doughemi Posted April 4, 2017 Posted April 4, 2017 Try not(Get(AccountName) = "matt" or Get(AccountName) = "kristen" or Get(AccountName) = "haley") Get(AccounName) ≠ "matt" is true whenever the account is anyone's but Matt's. Combined with the other statements, your calculation is always true; therefore you always hide the tab.
Recommended Posts
This topic is 2790 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now