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 Apps / Hide a view for certai...
Power Apps
Answered

Hide a view for certain users/security roles (Model Driven App)

(0) ShareShare
ReportReport
Posted on by 86

I have searched for this issue and from what I've seen, it looks like it is not possible. However, I am so surprised that this is the case, I thought I'd check, just in case it's me being a wally.

 

My scenario is:

  • I have an table/entity for which one of the columns is 'Person Status'.
  • Three of the views have a filter which doesn't show any records that have a 'Person Status' of 'New'.
  • One other view, includes records with the 'Person Status' of 'New'.
  • I only want users with a certain security role to be able to view all four views. The other users should only be able to see the three views that do not show records with the 'Person Status' set to 'New'.

 

Is this possible or are there any workarounds? It seems crazy that I can't do this!

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    Hi @jase ,

     

    You can associate Forms to security roles, but not Views.

     

    Some options:

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

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Linn Zaw Win Profile Picture
    2,996 on at

    There is another workaround in addition to @Amik 's suggestions.

    You can clone the model-driven app (one with x4 views and another one with x3 views). But there will be a duplicate effort of any change to the model-driven app, sitemap, modern commands, etc. so, I don't really recommend that workaround though.

     

    I just want to understand the main reason why you want to hide the view which contains the records with 'Person Status' = 'New'. Even if you hide it from view, the users can still find the records using modern advanced find (or the classic one). So, if the intention is for protecting the data, you might have to consider a more solid solution other than just hiding a view.

     

     

  • jase Profile Picture
    86 on at

    Thanks for the response @LinnZawWin and @Amik before.

    Let me elaborate a little @LinnZawWin. I put it across as a generic example previously but let me explain it closer to the actual situation.

     

    We have a list of shops that are going through the various stages from initial agreement to being opened (Initial Agreement, Legal, Setup, Open). We want to give access to the information (currently via a Model Driven App) about the shops to the various people involved (project managers, area managers etc). However, consider we have a list (view) of shops, the current 'real life' requirement is for only a small select number of people (who also have write access to the records) to be able to see any details of shops that have a status of 'Initial Agreement'. No-one else should be able to see shops/records until they are set to at least 'Legal'. Hence the need to somehow filter/hide records.

     

    I've implemented security roles, so I've put that small group of people in their own role, if we can do anything that way. The hiding a view was just an idea, but as you've pointed out, if they can still find the records via a search, then that idea is pointless.

    In terms of the separate app, I did think about that, when I woke up in the middle of the night the other day! However, aren't the views tied directly to a table and therefore always present whatever app/solution you put it in? Can you turn off a view in one app but have it on in another for the same table?

  • Verified answer
    Linn Zaw Win Profile Picture
    2,996 on at

    Yes. In the model-driven app designer, you can specify which forms and views are supposed to be visible for that particular model-driven app.

    LinnZawWin_0-1689769138410.png

     

    However, can still find the records via a search, so let's just solve this problem with a security model instead of just hiding from UI.

     

    In the solution from the following diagram

    1. Keep the records with 'Initial Agreement' status in different BU (Business Unit) by auto-assigning the records with 'Initial Agreement' status to the Team in that Restricted BU.
      1. When the record status is changed to Legal or something else, auto-assign the record to the last modified user so that the record is moved back to the Normal BU.
    2. Restrict normal user security roles to have access to the records within their own BU so that they cannot see the records in the restricted BU
    3. For the small group of people (privileged users),
      1. either set the access level of their security role to Organization level so that they can see all records regardless of the owning BU
      2. or enable the Record ownership across Business Units feature and assign the security role from the Restricted BU to the privileged users so that they have access to the records from both BU.

    LinnZawWin_1-1689770803935.png

     

     

     

  • jase Profile Picture
    86 on at

    @LinnZawWin What an absolutely fantastic explanation that is! I am very grateful for the effort you've put in.

    I will give that a go (along with some reading and learning!). I may well have some questions, but I will see if I can get it sorted based on the really helpful info you've already provided.

    Thanks again.

  • Linn Zaw Win Profile Picture
    2,996 on at

    @jase 

    Do you have any further questions or is everything sorted?

    If there is no further question, can you please mark it as a solution to close this thread? That will be useful for others in the community who come across this thread to identify the answer quickly.

     

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard