Thanks for this!
I was trying to figure out a way to set relevance on parts of a survey by multiple logins and the regex you showed helped me.
regex(${activity}, "D|S|R")
I created a csv:
UserGroup,UserList
City,JackJohnson|JillJohnson
Contractor,MarkSmith|MikeSmith
Then pulled the the user name lists into separate hidden questions:
CityUsers - pulldata('UserInfo','UserList','UserGroup','City')
ContractorUsers - pulldata('UserInfo','UserList','UserGroup','Contractor'')
now in the relevant column I just use this to hide or show based on who is logged in.
regex(property('username'), ${ContractorUsers})
regex(property('username'), ${CityUsers })
I looked for properties for either role or groups for the current user, but is doesn't look like that exists.
-bert