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

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:
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard