cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cperry07
Helper I
Helper I

Filter Gallery by User button

Hey Guys,

 

I have a gallery where I allow the ability to filter the gallery by the buttons "All" "In Progress" "Pending" & "Complete"

 

I have created a collection of "ToggleCol"

 

I would also like to add a button where the user can filter Tasks assigned to them named "My Tasks"

 

I have a form that the users have the ability to add users, which in SharePoint is a Users/Groups field. They can add multiple users to an assigned task. Is there a way that I can Filter the gallery for any tasks associated with a particular user by clicking a button as well? I have tried a few different methods, but none successful. The SharePoint Column Name is 'Responsible Person'

 

Thanks

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @cperry07 :

I've made a test for your reference:

1\I assume there is a list:

1.PNG

2\Add a button and set it's OnSelect property to:

Set(ShowMyTesks,!ShowMyTesks)

3\Use this formula to get the result:

If(
    ShowMyTesks,
    Filter(
        cperry07List,
        Assign.Email = User().Email
    ),
    cperry07List
)

42.gif

Best Regards,

Bof

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @cperry07 :

I've made a test for your reference:

1\I assume there is a list:

1.PNG

2\Add a button and set it's OnSelect property to:

Set(ShowMyTesks,!ShowMyTesks)

3\Use this formula to get the result:

If(
    ShowMyTesks,
    Filter(
        cperry07List,
        Assign.Email = User().Email
    ),
    cperry07List
)

42.gif

Best Regards,

Bof

View solution in original post

Hello,

 

Since I am creating a collection for my other buttons, it does not allow me to filter the gallery by anything other than my collection for some reason.

 

I am trying the following code with my button, but it doesn't seem to work.

 

ClearCollect(ToggleCol, Filter(AARList, 'Responsible Person' = User().Email), AARList)

 

Chris

Hi @cperry07 :

Please try:


ClearCollect(ToggleCol, Filter(AARList, 'Responsible Person'.Email = User().Email))

 

Best Regards,

Bof

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (24,348)