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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show records to specif...
Power Apps
Unanswered

Show records to specific users only.

(0) ShareShare
ReportReport
Posted on by

I have a Dataverse table "Tasks" in which I have 2 types of users.

  1. Accountable
  2. Responsible

For a task there will be 1 accountable and multiple responsible. 

Now in my app I have Gallery which shows the Task list. What I want is that the user should only be able to see the Tasks in which either the user is Accountable or Responsible.

 

My problem now is:

  1. Should I create "Accountable", "Responsible" columns in "Task" table and save the user email in "Accountable", "Responsible" columns.
  2. Should I create relation between "Task" and default "User" table.
  3. Restrict users to see only the Tasks in which they have a role .
I have the same question (0)
  • JoCopin Profile Picture
    26 on at

    Hi,

     

    I think you will have to create 2 relations between the "Task" and Default "User" table.

    One for "Accountable" and one for "Responsible"

    You will then be able to filter your Gallery Items with the power apps user() function that returns the current user infos.

  • Verified answer
    Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

    You should be using a lookup to the user entity as a column in the Task to set the Accountable or Responsible user vs setting the email into the field.  When you add the lookups to the User table on the Task table it will automatically create the referential relationship for you.

     

    Now, restriction is a different situation...  What you are doing here are adding lookups and you will not be able to drive security based on these lookups.  To secure the tasks to be updated by only those users assigned as accountable or responsible you would need to setup an Access Team on the Task table and when you populate the lookups have this run a realtime workflow to add the users to the access team (or remove if you change the users).

     

    By doing it this way then the security on the table will be setup correctly and you can utilize roles in the system to control updating of the tasks.

     

    One more thing to think about is if you will ever have multiple "responsible" users that are assigned to the tasks.  If this is the case you might want to consider adding a relationship table instead.  You could create another table that is "User Task" that will have the owner set to the User, lookup to the Task, along with a field with two options "Responsible" / "Accountable".  You can have this table setup as the following relationship.

     

    dpoggemann_0-1613645799967.png

     

    In this model you could have multiple responsible or accountable users setup for the tasks or if you are going off the RACI model you could have roles for Consulted and Informed as well :).  You would still need to utilize the Access Team to control updates to the Task itself.

     

    Hope this helps, if so please mark Accepted Solution.

     

    Thanks,

     

    Drew

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @JoCopin 
    Thanks for the reply but I think that when I will have thousands of records in the system than performing the filter function will effect the app performance.

  • Community Power Platform Member Profile Picture
    on at

    Hi @dpoggemann 

    Thanks for explaining the process in detail. But as a beginner It will be great if you can share with me any article or youtube video because I am a visual learner and all this text about the process is little bit vague to me.

    And more thing that lets say i have thousands of records in Tasks table so, it will mean that i need to create Access Team for each decision. Having so many teams will it effect the app performance?

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @Anonymous ,

     

    I wouldn't worry about the Access teams and the scalability.  I have used these in environments with large numbers of records with no impact.  This is not "Owner" teams so it is a little different than yo might be thinking...

    Couple of helpful links:  https://powerobjects.com/dynamics-365/using-access-teams-dynamics-365/https://powerobjects.com/crm-101/access-teams-in-dynamics-crm-2013/ 


    Overall this is talking about Dynamics 365 / CRM but this can be used in any Power Apps leveraging the Dataverse.

     

    Hope this helps.

     

    Please let me know if you are asking something else or need more clarity.

     

    Thanks,

     

    Drew

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard