Jump to content
wattmhite

Hide tab when get account = username

Recommended Posts

wattmhite    2

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

 

Share this post


Link to post
Share on other sites
comment    1,368
Posted (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 by comment
  • Like 1

Share this post


Link to post
Share on other sites
doughemi    82

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


×

Important Information

By using this site, you agree to our Terms of Use.