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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / How to restrict visibl...
Power Pages
Answered

How to restrict visible record rows by Web Roles

(0) ShareShare
ReportReport
Posted on by 56

Hello guys,

 

I want to create a solutions, consisting of Contact, Web Roles and some other custom tables: Company, Company Relationship, Org Type,... to control the displaying of data record. 

Hannz_0-1697532394732.png

Let say I have 5 companies:

+ Company 1 (Level1) manages Company 2(Level2), Company 3(Level2)
+ Company 4 (Level1) manages Company 5 (Level2)


I have 2 Web Roles:

+ Super Role: Can see everything. 
+ Level 1: Contact in Company Level1 will have WebRoles: Level1
+ Level 2: Contact in Company Level2 will have WebRoles: Level2

 

I have Post table, which contains the data made by user, which is in Contact table. So I want to restrict the data record permission, the management company (Ex: Company1) can see Post made its self, or made by its subordinators (Ex: Company 2, And Company 3), like:
+ User Company 1 can only see data made by Company 1, Company 2 , Company 3. But Company 2 , Company 3 can not see data of Company 1
+ User Company 4 can only see data made by Company 4, Company 5, Company 3. But Company 5 can not see data of Company 2


How can I actually implement this? 

 

Thank you!!

 

Categories:
  • Lucas001 Profile Picture
    2,595 Super User 2026 Season 1 on at

    Hi @Hannz,

     

    this sounds rather complicated and a lot of things to consider.

    Just one simple question which could work in you case. Are Level 1 and 1+n consistent and permanently assigned to the data?

     

    If yes a easy solution would be to create a view for level 1 to 1+n, display all the views inside your page and use the webroles to see where the current loggedIn User belongs to. User jQuery to remove or hide all other views on that page.

     

    If it is possible to actually implement what you want and adjust the rows depending dynamically on the logged in user, I am really unsure.

    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

  • Hannz Profile Picture
    56 on at

    Thank you for responding, @Lucas001 !!

     

    Yea, that seems a lot of work need to be done. 

    I think it could be easier if we can somehow apply the data query or/and take advantage of the table relationship via filters.
    How can I fill the criteria field dynamically in the filters? What is the best way to do that? 

     

    Hannz_0-1697569957217.png

    Could you please give me some example for reference?

     

    Thank you very much!!

     

  • Verified answer
    Lucas001 Profile Picture
    2,595 Super User 2026 Season 1 on at

    Hi @Hannz,

     

    that's the problem you cannot use a dynamic filter on those tables.

    Would it be possible to create a view for the levels and display or don't display them according to the webpage?

     

    Another approach would be to use the webrole and use liquid to than create a table dynamically on your page with HTML and CSS, where you could also apply more filter options. As you said a bit more work than usual. If you want to go that way - try the CRMToolbox: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjevvW5r_-BAxV9SvEDHTJKDMIQFnoECBIQAQ&url=https%3A%2F%2Fwww.xrmtoolbox.com%2Fplugins%2FCinteros.Xrm.FetchXmlBuilder%2F&usg=AOvVaw0Bi-58n1UA1SrWBK0o55l2&opi=89978449 .This will be a great tool for such cases.



    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

  • Hannz Profile Picture
    56 on at

    Thank you for advice. That will help me go the right direction.

    I have another question posted here

    Can you please have a look too?

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 134

#2
Mohsin Ali Profile Picture

Mohsin Ali 36

#3
11manish Profile Picture

11manish 14 Super User 2026 Season 2

Last 30 days Overall leaderboard