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 / Is it possible to give...
Power Apps
Answered

Is it possible to give admin view and user view on gallery in powerapp

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi i have created a gallery in powerapp and im trying to give user a view based on admin and normal user so my app goes like this Admin will create a project say name Project1 -> test -> files so this is the hierarchy of the files admin will create and i have given admin view by creating 3 galleries, gallery1 - which will show Project1 and so on and I wanted admins to see only the projects they have created my formula for

gallery1 - Filter(Documents, 'Created By'.Email = TextInput3.Text && IsFolder && 'Folder path'="Shared Documents/") 

gallery2 - Filter(Documents,'Folder path' =Gallery1.Selected.'Full Path'&"/" )

gallery3 - Filter(Documents,'Folder path' =Gallery2.Selected.'Full Path'&"/" && !(IsFolder))

All i want to do is give normal user the view inside the test folder and the files created by the respective user

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want:
    1)admin could view three galleries and gallery1 for Project folder names, gallery2 for test folder names, gallery3 for file names?

    2)common user could only view respective file names?

    If so, I suggest you filter based on 'Folder path' field.

    Try this:

    1)gallery1's Items:

    Filter(Documents, 
     'Created By'.Email = User().Email && 
     IsFolder && 
     'Folder path'="Shared Documents/") 

    gallery1's Visible:

    If(User().Email in [adminemail1adminemail2,adminemail3],
     true,false)
    //please fill in admin emails in [adminemail1adminemail2,adminemail3]

    2)gallery2's Items:

    Filter(Documents, 
     'Created By'.Email = User().Email && 
     IsFolder && 
     'Folder path' =Gallery1.Selected.'Full Path'&"/" 
     )
    

     

    gallery2's Visible:

     

    If(User().Email in [adminemail1adminemail2,adminemail3],
     true,false)
    //please fill in admin emails in [adminemail1adminemail2,adminemail3]

     

    //then gallery 2 will display folders based on gallery1. Gallery1 and gallery2 will only be visible when current user is admin. 

    Gallery1 and gallery2 will filter based on current user.

    3)gallery3's Items:

     Filter(Documents,!(IsFolder),
     'Created By'.Email = User().Email
    )
    
    

    gallery3's Visible:

     

    If(User().Email in [adminemail1adminemail2,adminemail3],
     false,true)
    //please fill in admin emails in [adminemail1adminemail2,adminemail3]

     

    Then gallery3 will only display current user's files. Gallery3 will only be visible when current user is not admin.

     

     

    Best regards,

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard