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 / Gallery Filter with view
Power Apps
Unanswered

Gallery Filter with view

(0) ShareShare
ReportReport
Posted on by 157

Hi,

 

I have 3 SharePoint Groups

SharePointGroup1

SharePointGroup2

SharePointGroup3

 

These groups have some users

 

And I have a list field name >> Item Status with choices

New

On Progress

 

In the same list, there's another field name >> AssignTo

 

SharePointGroup1

SharePointGroup2

SharePointGroup3

 

I need to filter a gallery with views for each group to see the only list with status "On Progress" when the "Assign To" to the specific group

 

For example :

 

A list item with Status "on progress " and assign to "SharePointGroup2"

 

So only group name "SharePointGroup2" can see this list only that assign to "SharePointGroup2"

 

And a group "SharePointGroup3" can see the list with assign to "SharePointGroup3"

 

Thanks

Categories:
I have the same question (0)
  • leyburn19 Profile Picture
    2,157 on at

    The only way I think you can achieve this is to have a seperate SP list with User Name and Group Name.  When the user logs in you create a gloable variable based on teh list where the loging user matches their own name and then puts the group name into the global.  This then means all your galleries simply use this as pert of its filter

  • Sharif Alhennawy Profile Picture
    157 on at

    @leyburn19

     

    Thanks for your reply, may I ask more explanation with steps .. I'm still PA Beginner!

  • leyburn19 Profile Picture
    2,157 on at

    On starting an App every user profile is available for use based on name and email

     

    To achive this I would:

     

    1.  Create a new SharePoint List with 2 Text Columns. Col 1 for the User name and Col2 for User Group

    2.  Load the list with all your user names and their group.  I would use the user profile name not the email as I have found there can be case difference in profile to email.   You could also achieve this with a smart startup on the App that if the user does not exist in the list they need to create themselves first.  This will ensure both profile name and case are  correct

    3. When an app starts (OnStart) you do a number of things:

    a. create a collection based on the sharepointlist Eg: ClearCollect(MyCollection,SPList)

    b. Create a global Variable based on the user name.

    c. Set the variable to be User().Fullname. eg Set(Username,User().Fullname)

    d. Put a hidden dropdown on the form that will capture the group name.  Set its items property to:

     

    Distinct(Filter(CollectionName,namecol=UserName),GroupColName)

     

    This dropdown will now have the result from the Collection that matches the User.

     

    e. Now set the another globlal variable to = the dropdown value.  EG: Set(UserGp,Dropdown1.Selected.value)

     

    At the end of startup you will now have two variables with the username and group

     

    I assume there is a group column in your main list?

     

    4. Now I would simply filter any gallery to include the UserGp variable eg:

     

    Filter(SPList,GROUPColumn=UserGp)

     

    You can use the above filter with sort etc

     

    Hope that all makes sense.  Others may have a better way.  You could also create the user column to be a people column to improves matching, but this adds complexity to the extraction

     

    As I said at the start you can get the user do all teh work by having a start up filter that looks for the user name in teh collection and if not found,   takes them to a new screen where they must add their group.  When you save patch this gp and teh user login profile name to the list and they will now be there.  All you had to do was create the list

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard