web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter the gallery whi...
Power Apps
Unanswered

Filter the gallery which has lookup column

(0) ShareShare
ReportReport
Posted on by 2
Hello All,
 
     I have a Canvas App in which I'm displaying a gallery and the table used for that galley is "tbl_engine" and I'm displaying a column inside that galley using lookup function and the code for that column is
lookup(tbl_commodity, commodity_id= int(lookup(tbl_eng_commodity,  eng_id=thisite.eng_id, commdity_code)),part_number);
I would like to filter the galley with the help of  part_number displayed in the gallery.
 
the items property of the gallery has the below code
 
Filter(tbl_engine,
           eng_id=dropdown1.selected.value,
           search_1.text in text(eng_description))
 
I've tried different ways to add that condition in the above filter but no luck. Looking forward to hear from the community.
 
Thanks
Idris 
Categories:
I have the same question (0)
  • SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    Filter the gallery which has lookup column
     
    lookup function Lookup(tbl_commodity, commodity_id = 
        Value(Lookup(tbl_eng_commodity, eng_id = ThisItem.eng_id, commdity_code)), part_number)
     
    To filter the gallery by part_number, add the lookup logic into the Filter function of the gallery's Items property.
    Items Property Code: Filter(
        tbl_engine,
        eng_id = Dropdown1.Selected.Value,
        Search_1.Text in Text(eng_description),
        Lookup(
            tbl_commodity,
            commodity_id = Value(Lookup(tbl_eng_commodity, eng_id = eng_id, commdity_code)),
            part_number
        ) = Search_2.Text
    )
     
    tryout and let me know if you have issues.
  • Suggested answer
    CU26122340-0 Profile Picture
    2 on at
    Filter the gallery which has lookup column
    If you are using Dataverse/SQL server or similar (as opposed to sharepoint lists);  Create a view joining tbl_engine with tbl_commodity...something like 'SELECT * FROM tbl_engine INNER JOIN tbl_commodity ON tbl_engine.eng_id=tbl_commodity.eng_id;'. Then in items property use: Filter(view, part_number = dropdown1.Selected.Value).
    The lookup used for partnumber would become ThisItem.part_number instead of a lookup (the lookup now being down by dataverse/SQL Server.)
  • Idris_Mohd Profile Picture
    2 on at
    Filter the gallery which has lookup column
    The Data source for this application is Dataverse. We have more than 30 tables to fetch the data and use them in this application and We don't want to merge the tables as the number of columns and the data is getting increased which will have an impact on the performance. Hence we want to use the lookup functionality to reduce the size of the tables.
  • WarrenBelz Profile Picture
    152,839 Most Valuable Professional on at
    Filter the gallery which has lookup column
    Firstly try this
    LookUp(
       tbl_commodity, 
       commodity_id = 
       int(
          LookUp(
             tbl_eng_commodity,  
             eng_id = ThisItem.eng_id
          ).commdity_code
       )
    ).part_number
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard