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 / 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

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
    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

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard