For a database on a server or a local database with "Enforce a consistent Access Control List across all replicas" in effect, @UserNamesList returns a text list containing the following information for the current user:
@UserNamesList
names
Text list. Each list item is a name or role as specified previously. Returns an empty string ("") if the current database is local and "Enforce a consistent Access Control List across all replicas" is not in effect, and the database is not replicated with the server database at least once.
This function does not work in column, selection, mail agent, or scheduled agent formulas.
Choose File - Database - Access Control, Advanced to set "Enforce a consistent Access Control List across all replicas."
@UserRoles returns a subset of the information returned by @UserNamesList.
@If(@IsMember("Marketing Team"; @UserNamesList);
"Marketing Head"; "Generic Head")