Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a dashboard with some elements that I want to show or hide based on the user of the PC it is being viewed on. I've got a separate 'security' table set up with a list of usernames, then a 1 or 0 for access or no access.
The conditional show statement I use is something like:
=If(Only({<username={$(=osuser)}>} permission)=1,1,0)
username is the username field name and permission is the field that is linked to the sheet/object I want to show or hide. If the username of the person logged in to the PC is found in the security table and the permission field contains a 1, then it is shown, otherwise it is not.
This works for all usernames except for those that contain hyphens - all objects are displayed for these users.
Can anyone shed any light?
Thanks in advance
Did you try enclosing the $(=osuser) in double quotes?
Usually it should be enclosed in double quotes so as to avoid the problems caused by special characters and spaces.
Thanks
Did you try enclosing the $(=osuser) in double quotes?
Usually it should be enclosed in double quotes so as to avoid the problems caused by special characters and spaces.
Thanks
osuser()
Resolved:
As per maxgro's response, it should've been osuser() in the original post (typo).
The solution was to put single quotes around the $(=osuser()) in the set analysis. I think the hyphen was being treated as an operand rather than text, the quotes forced it to be considered as text.
Thanks!