Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

filter browse gallery based on lookup field

(0) ShareShare
ReportReport
Posted on by 199

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

 

 

  • batmanMon Profile Picture
    199 on at
    Re: filter browse gallery based on lookup field

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

  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: filter browse gallery based on lookup field

    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

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 110 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 81

#3
stampcoin Profile Picture

stampcoin 54

Overall leaderboard