If I take the conditions out about the TypeAdmin, it works. And I’ve checked, TypeAdmin does contain the UserName. What can I do? Only the TypeAdmins are allowed to see and edit that bit, except for HR and IT. But I can’t seem to hide it otherwise?
Using negatives in or statements can lead to one pulling one’s hair out! Just guessing that you want the person who either has the role or is the TypeAdmin to be able to see the tab.
I also wonder if @Trim does any good here. If you have common names with multiple blanks in your organization, @Trim would ONLY be appropriate, if it has been used in populating the TypeAdmin field as well. And even then I’d rather remove it from both formulas.
Also, when converting from @IsNotMember to @IsMember, watch out for the exact meanings:
@IsMember(“[HR]”:“[IT]”; @UserRoles)
Returns @True only, if the user has both, the [HR] AND the [IT] role. I assume, that this is not what you want.
@IsNotMember(“[HR”:“[IT]”; @UserRoles)
on the other hand returns @False only, if the user has neither the [HR] nor the [IT] role.
I second the advice to rather not use @IsNotMember, but you should rather replace it with
“[HR]”:“[IT]” *= @UserRoles
to keep the same meaning, as in your original example.