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 / filter browse gallery ...
Power Apps
Unanswered

filter browse gallery based on lookup field

(0) ShareShare
ReportReport
Posted on by 202

Hi, I have 2 SharePoint lists. 1st one is a lookup list, it has two columns (Country, ID), 2nd one collects all the data. I record all the data from PowerApp to my 2nd (main list). In my edit screen I use something like that 

 

LookUp(Country,ID = GalleryItem.CountryNameID)

 

Country (2nd list, lookup)

CountryNameID (1st list, main one)

 

It works perfect. However, I cannot make it work in the filter in BrowseGallery. I have tried something like that but it didnt work. Can anyone please advice what i did wrong 😞
Sort(Filter(allRecords, If(IsBlank(CountryFilter.Selected),true,CountryFilter.Selected in LookUp(Country,ID=ThisItem.CountryNameID,CountryName) ),
ID,
SortOrder.Descending)


"CountryFilterSelected" is the name of my combobox to filter the gallery

batmanMon_0-1701698990249.png 

batmanMon_1-1701699061620.png

 

 

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

    Hi , @batmanMon 

    According to your description, you want to filter by the LookUp column.

    This is my test sharePoint list :

    vyueyunmsft_0-1701741393564.png

    This is my canvas app:

    vyueyunmsft_1-1701741419083.png

    Combo box - Items:    Country

    Gallery -items:   

    Sort( Filter(allRecords, CountryNameID.Id in ForAll(CountryFilter.SelectedItems,{Id:ThisRecord.ID}) || IsEmpty(CountryFilter.SelectedItems) ),ID,SortOrder.Descending)

     

     

     

    If I misunderstand what you mean, you can describe your needs and your expected outcomes in detail so that we can better help you. You could give me your sharepoint list sample data in your side .


    Best Regards,

    Yueyun Zhang

     

  • batmanMon Profile Picture
    202 on at

    @v-yueyun-msft  works like a charm. Thank you!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard