cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tereza
Frequent Visitor

Filter gallery according to another SP list

Hello ,

I have created a SharePoint list called Tasks and in this list I have three columns:
Project Owner (People picker)

Division (Look up at divisions list)

Country (look up at countries list )

Also , I have created another list called Project Managers that has three columns :

User (People picker)

Division (Look up at divisions list)

Country (look up at countries list )

In  my PowerApp I have added a gallery that displays the data from Tasks list and I have added a radiobutton to filter the items based on a condition.

I would like when I choose “All Tasks” to filter according to the country value from ProjectManagers List based on the user that is logged in and belongs to ProjectManagers .

PowerApps.png

 

Project Managers List:

User |Division | Country

User 1, International , Cyprus

User 1, International, Bulgaria

 

For example for User 1, I would like to display only the entries that have as Country “Cyprus” and “Bulgaria”

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Tereza ,

Do you want to filter your Tasks List according to the country value from Project Managers List based on the user that is logged in and belongs to Project Managers List?

Could you please share more details about the Filter formula you have already typed within your app?

 

Based on the needs that you mentioned, I think the Filter function and If function could achieve your needs. Please consider take a try with the following formula (set the Items property of the Gallery to following😞

Filter(
       Tasks,   // Tasks represents your Task List
       If(
          Radio1.Selected.Value = "All Tasks",
          Country.Value in Concat(Filter('Project Managers List', User.Email = User().Email), Country.Value & ";"),
          Radio1.Selected.Value = "My Tasks",
          ....,                             // Type filter condition for "My Tasks" option
          Radio1.Selected.Value = "Assigned to me",
          ....,                             // Type filter condition for "Assigned to me" option
          Radio1.Selected.Value = "Late Tasks",
          ....,                            // Type filter condition for "Late Tasks" option
          true
       )
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @Tereza ,

Do you want to filter your Tasks List according to the country value from Project Managers List based on the user that is logged in and belongs to Project Managers List?

Could you please share more details about the Filter formula you have already typed within your app?

 

Based on the needs that you mentioned, I think the Filter function and If function could achieve your needs. Please consider take a try with the following formula (set the Items property of the Gallery to following😞

Filter(
       Tasks,   // Tasks represents your Task List
       If(
          Radio1.Selected.Value = "All Tasks",
          Country.Value in Concat(Filter('Project Managers List', User.Email = User().Email), Country.Value & ";"),
          Radio1.Selected.Value = "My Tasks",
          ....,                             // Type filter condition for "My Tasks" option
          Radio1.Selected.Value = "Assigned to me",
          ....,                             // Type filter condition for "Assigned to me" option
          Radio1.Selected.Value = "Late Tasks",
          ....,                            // Type filter condition for "Late Tasks" option
          true
       )
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-xida-msft  the problem is solved!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,761)