Hello,
I have the following hide-when formula in a hotspot button,
user := @Name([CN]; @UserName);
@If(user = “Johnny Smith” : “Freddy Jones” : “Murray Ellersley” ; @False; @True)
Jonny and Freddy are able to see the button which is what I want. Yet Murray cannot see the button. What are some possible troubleshooting methods I can do to try and get Murray to see the button?
Thanks!
Subject: Hide-When Oddity- try this
User:= “Johnny Smith” : “Freddy Jones” : “Murray Ellersley”;@IsNotMember(User;@Name([CN];@UserName))
Try this and see if it works in your Hide/When
Subject: Hide-When Oddity
Thank you both, greatly! I’ll give it a whirl.
Subject: Hide-When Oddity
I would suggest a couple of things. First, always make sure that you are comparing the same case. While the LotusScript language is case-insensitive for the most part, comparison operations are usually not. Also, you might want to use a trim function to ensure there are no leading/trailing spaces. You could code something like this:
user := @lowercase(@trim(@Name([CN]; @UserName)));
@If(user = "johnny smith" : "freddy jones" : "murray ellersley" ; @False; @True)
The @username function should have returned a single text value, but be careful when using this type of compare operation on text strings. If you are comparing a temporary variable that is a text list to another text list, the results might not always be what you expect. In some cases you might want to use the “permutation operator” for an equality comparison( “*=” instead of just “=” ).
You could also use the @IsMember function instead of an equality comparison.