Hi everyone,
I’m working on a role-based project list in a Canvas app backed by Dataverse.
Schema:
Projects table → main project info (title, description, priority, status, due date)
Users table → app users
Project_Assignees table → link table with lookups to Project (Project_ID
) and User (User_ID
)
Requirements:
Admins → See all projects
General users → See only projects assigned to them
Both roles → Use the same gallery layout (ProjectId, ProjectTitle, ProjectDesc, Priority, Status, DueDate, full Project record for edit)
Need search, priority/status filters, and sorting by due date
Question:
Has anyone designed something like this with delegation in mind?
Is it better to start from the link table for both roles, or use Projects for Admin and link table for General users?
How do you keep the gallery schema consistent across roles without breaking delegation?
Any patterns or best practices to handle filtering/search/sort efficiently when starting from a link table?
Thanks in advance for sharing your experience with role-based filtering in Dataverse!
myProjectIDs:Distinct(Filter(Project_Assignments, 'User_ID'.'Email address' = User().Email),Project_ID.Projects)
isAdmin,
Projects,
Filter(Projects, Projects in myProjectIds)
My bad ,I should have been more specific.
What my question is like: I have a User table (custom Dataverse table) with user details like email, name, number, user ID, and so on.
My requirement is:
User 1 (Admin) -> based on their email -> should see all projects.
User 2 (General role) ->based on their email -> should see only projects assigned to them.
There’s no environment security or Dataverse security roles in place right now, as this is just a personal project / POC.
// One-formula Items using With(): Admin => Porjects; General => Projects filtered by my Project IDs (Projects column is GUID)
IfError(
With(
{
isAdmin: gvar_CurrentUserRole = "Admin",
myProjectIDs:Distinct(Filter(Project_Assignments, 'User_ID'.'Email address' = User().Email),Project_ID.Projects)
},
If(
isAdmin,
Projects,
Filter(Projects, Projects in myProjectIds)
)
),
[]
)
gvar_CurrentUserRole
logic:
// Return the current user's Role choice as text from Dataverse
With(
{
u: LookUp(
Users,
'Email address' = User().Email
)
},
IfError(
Coalesce(
Text(u.Role),// Convert whatever is returned to text
"Unknown"
),
"Unknown"
)
)
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473