web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Need Help !! Building Project Management App

(0) ShareShare
ReportReport
Posted on by 604

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!

I have the same question (0)
  • Michael E. Gernaey Profile Picture
    47,125 Super User 2025 Season 2 on at
    Need Help !! Building Project Management App
     
    Instead of more words, please show all the code you are doing, with pictures of any delegation issue you are having so I can help resolve it.
     
     
  • Power Apps 1919 Profile Picture
    604 on at
    Need Help !! Building Project Management App
    Hi @Michael E. Gernaey, correct me if I am wrong,
     
    I have to show projects based on the role and and it is coming from same table but, the problem is I am not able to interconnect two tables (project and project assignment) without delegation warning kicking in.
    As it is a complex datatype column (lookup column)
    Even if I try my formula,which uses distinct function and distinct is table formula (which converts the data type to table) which silently is not delegating back to data verse and that is the main issue.
     
    So my approach is one gallery directly connected to projects (admin view)
    And one gallery connected to project assignment with formula as 
    Filter(Project_Assignment,User_Id.Email= User().Email).Project_Id.
     
     
  • Michael E. Gernaey Profile Picture
    47,125 Super User 2025 Season 2 on at
    Need Help !! Building Project Management App
     
    I am not  understanding why you want to Galleries. Thats more work then simply setting the same gallery simply based on the same code you need to check (actually less), for which data to load.
     
    Doesn't both galleries , regardless show the same data?
     
    Meaning, you will never load Both galleries for a single person, so why have 2 of them on the screen taking resources, unless you are saying you are going to have completely different data on each, then yeah use different ones
  • Power Apps 1919 Profile Picture
    604 on at
    Need Help !! Building Project Management App
    HI @Michael E. Gernaey,
    I am thinking to keep two separate Galleries (1 for admin and 1 for general user) . and galleries are based on delegable formulas, will that work ??
    and I will control the visible property based on user role variable.
    or any better method?
  • Power Apps 1919 Profile Picture
    604 on at
    Need Help !! Building Project Management App
    Hi @Michael E. Gernaey, i changed the setting, to 1 instead of 500 (i saw in one article - Delegation in Power Apps - How to identify and test! | Hardit Bhatia: The Power Addict)
    and this is the part,which is causing issues:
     
     myProjectIDs:Distinct(Filter(Project_Assignments, 'User_ID'.'Email address' = User().Email),Project_ID.Projects)
    here filter gives me 3 records (which is correct as i have only 3 records based the mapping) but distinct is resulting to one record only.
     
  • Michael E. Gernaey Profile Picture
    47,125 Super User 2025 Season 2 on at
    Need Help !! Building Project Management App
     
    I have never seen a case where delegation is not happening if there is no warning.
     
    How are you determining that its not giving you all you want? Did you change delegation from 500 to 2000? 
     
    and which part is not delegating? I am assuming you mean the in part?
     
                isAdmin,
                Projects,
                Filter(Projects, Projects in myProjectIds)
  • Power Apps 1919 Profile Picture
    604 on at
    Need Help !! Building Project Management App
    HI @Michael E. Gernaey,
    Thanks for the detailed explanation, then as suggested I will revert back to email / upn .
    The problem is, the code is working as expected but, it is not delegating, I tested this by changing data rows limit to 1, to see, if this is delegable or not. 
    and it is not delegable and even though i am not seeing any warning.

    How should I tackle this? (just a random thought can I use views here?) 
  • Michael E. Gernaey Profile Picture
    47,125 Super User 2025 Season 2 on at
    Need Help !! Building Project Management App
     
    Thank you for the clarification. You essentially did my option #3. I will say that honestly I wouldn't switch to the ID versus email. It's hard to give a long winded explanation, but later on, there are many more activities, actions, authorizations that will happen in other parts of the platform that need email/upn so the ID can end up causing you more of an issue.
     
    Not that you cannot and maybe I am not understanding why you say its more robust and that could be based on your application, but overall would not be. Think of it like using the GUID for a user in Dataverse, versus their User Object / Email for each owner column, same for SharePoint, instead of person columns or emails etc you just used the ID. All possible but will be problematic long term.
     
    Again I could be wrong as I do not understand your scenario or reasoning on the statement.
     
    However, my question is, what is not working? What you have looks great.
  • Power Apps 1919 Profile Picture
    604 on at
    Need Help !! Building Project Management App

    Hi @Michael E. Gernaey,

    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.
     

    i tried something like :
    // 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"
        )
    )

    ultimately i will shift to gvar_CurrentUserID as it is more robust instead of User().Email.
    Set(gvar_CurrentUserID,LookUp(Users,'Email address' = User().Email).Users);

    Thanks for helping.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    47,125 Super User 2025 Season 2 on at
    Need Help !! Building Project Management App
     
    I am not sure what you mean by delegation. In Canvas Apps terms, it is used to describe what and where will Filtering etc be processed (on the Client or the Server).
     
    What you need is quite easy actually.
     
    You have a couple of options on how to set it up, but it works the same
     
    These are different options so pick one you like, since you are using Dataverse, and I do not know if you are creating Groups in Entra linked to Dataverse, and Roles assigned etc.
     
    Options to configure your ":delegation" of roles
     
    Option 1 use Dataverse / Entra Roles
    1. Create a Specific Role in Dataverse (or an Entra linked) that is for instance AppUser Role and assign this role to all users. 
    2., Then create a specific AppAdmin roles
     
    Option 2 Use Entra Security Groups (or even Office 365)
    1. Create a security group for AppUsers and add the app users to it
    2. Create a security group for AppAdmins and add the admins to it
     
    Option 3
    1. Create a Table in Dataverse or SharePoint and have roles in one which really is just a lookup type User or Admin
    2. Create another that has the user emails and then a column to map to Admin or User
     
    Now, deciding on which one you do now do this
    1. In your App, if you do #1 or #2 you will need to query the security groups and Roles that the person is in
    2. In all the places where you are doing filters etc, you would have a Switch, where if the user has the AdminRole, or is in the AdminSecurityGroup you just use all the rows
    If they have AppUser or SecurityGroup for Users, then filter by owner email address which is the user logged in
     
    If you do #3
    Its the same, you query the list, find out if they are an admin or an app user
    Then in your filters again, you will need to check if are admins or users and again just have a switch and filter/lookup etc based on if they are the AdminRole or AppRole
     
    Now I recommend personally that you use Dataverse Roles and or Security groups, because, this way you can apply those roles to the Tables directly in the Admin, so that not only is it blocked in the UI, its blocked in the Back end. But in your canvas App, it will not Automatically do it for you, so you have to do the filtering how I described
     
    Hope that helps.

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473