Jump to content
Server Maintenance This Week. ×

Hide tab when get account = username


wattmhite

This topic is 2578 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 2578 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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