You don't use brackets. [Full Access] is the only one where you need that.
Your expression looks syntactically correct for what you want to do--Hide the object if any user but those three opens the file.
Better check those privilege set names again--make sure that you haven't confused Account Names with Privilege Set Names.
1 of 1 people found this helpful
What phil said.
Also, you can try this variant that makes it easier to see the privilege set names, and change the list if necessary:
Get ( AccountPrivilegeSetName ) ;
List ( "[Full Access]" ; "Station Access" ; "Demo_Access" )
On further review, I wonder if the original expression needs some parenthesis, such as:
( Get ( AccountPrivilegeSetName ) <> "[Full Access]" ) and
( Get ( AccountPrivilegeSetName ) <> "Station Access" ) and
( Get ( AccountPrivilegeSetName ) <> "Demo_Access" )
But I much prefer to use either FilterValues or a custom function built on it myself for this kind of thing. It saves effort when you later find that you need to add or remove a list element.
On further review, I wonder if the original expression needs some parenthesis. [...]
What operator binds tighter - '<>' or 'and' ...
This is not answer, but why do you use both space and underscore for separator of the names?
The Demo_Access was a last minute, temporary account for training purpose and it is habit to us "_". Accounts are the only place I don't use "_". So, no good reason.
Thank you for your responses. The only user privilege set name that will actually show the object is [Full Access]. I tried going into Station access and removed all of the restrictions, but still nothing. I then deleted Station Access and recreated it from scratch but nothing. I tried all of the methods provided in this string... Any ideas on how to proceed, Perhaps a diagnostic sequence to try?
Update: I can get it to work with a shape but not a field button.
FIXED: I guess I played with it too much. Deleting the objects and recreating them form scratch worked. The original Hide Object calculation works.
Thank you again for your responses.
What operator binds tighter - '<>' or 'and'
Comparison operators have precedence over logical AND.
Thanks David, but I was just being my facetious self
Just adding another format option for the hide calc and multiple independent conditions.
Get ( AccountPrivilegeSetName ) ≠ "[Full Access]"; 1;
Get ( AccountPrivilegeSetName ) ≠ "Station Access" ; 1;
Get ( AccountPrivilegeSetName ) ≠ "Demo_Access"; 1;
bigtom's idea is also great because Case statements only evaluate until true and don't continue evaluating like an If Statement with and's, which make them faster operations.
For case, negate operator to = ?
Get ( AccountPrivilegeSetName ) = "[Full Access]"; 0; // don't hide if full access
Get ( AccountPrivilegeSetName ) = "Station Access" ; 0; //if not full access, don't hide if...
Get ( AccountPrivilegeSetName ) = "Demo_Access"; 0;
Using "=" is how I would do it. Same logic, different view. I was just sticking with OPs initial operator.