Hi @mseto ,
Could you please share a bit more about your scenario?
Do you want to add a field in your CDS Entity to allow multiple users selection?
If your data source is a CDS Entity, and you want to add a field in your CDS Entity to allow multiple users selection, I afraid that there is no way to achieve your needs in PowerApps currently.
Currently, within PowerApps, there is no field type supported in CDS Entity to allow multiple users selection. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas
As an alternative solution, I agree with @eka24 's thought almost. You could consider add a Option Set Type column called "Role" in your CDS Entity (the "Roles" field reference values from the Option Set called "Roles"), use it to store the required role level for each record. This Option Set type column should have the following available options:
User
Admin
Then you could create another CDS Entity (called "Contributors"), within this Entity, store the detail info of these end users who would run your canvas app. This Entity should contains User Name, Email, RoleType, ... etc. The RoleType is also a Option Set Type column, which reference values from same Option Set as the "Role" column in your main Entity.
Within your app, add above new created Entity as data source. Set the OnStart property of the App to following:
Set(
CurrentUserRole,
LookUp(Contributors, Email = User().Email).RoleType
)
Set the Items property of the Gallery to following:
Filter(
'Your Main Entity',
If(
CurrentUserRole = Roles.Admin,
true,
Role = CurrentUserRole
)
)
Please consider take a try with above solution, then re-load your app (fire the OnStart property of App), check if the issue is solved.
Best regards,