I would like to make a selection criterion in Lotus notes Views base on the role the user belongs to, using the below code
SELECT FORM ="User" & Retired = "0" | (@IsMember("[Admin]";@UserRoles))
but whenever I check for the roles it return @UserRoles return an empty string "". any idea how to go about criterion
You can't use @UserRoles in a view selection. From Domino Designer help:
This function does not work in column, selection, mail agent, or scheduled agent formulas.
You need to use readers fields. In your case, a document must have a readers field with [Admin] as a value.
Read more about readers and authors fields at Using and understanding Reader Names fields in IBM Lotus Notes and Domino or Reader and Author Field Troubleshooting.