cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mehta_Tech
Helper I
Helper I

Filter or Search in Relational Gallery like parent child aka nested gallery

Hello, 

So I have an issue that im really struggling to resolve. 

I'm creating CRM app that can generate report in app i have relational gallery like parent child gallery or aka nested gallery i want to filter the gallery with search textbox or multiple filter.

when i search by user the main gallery run perfectly but when i referencing child gallery with product details  in doesn't work or might be my execution is wrong so can any one help me to figure it out..

here i attach the screenshot 

1 ACCEPTED SOLUTION

Accepted Solutions

11 REPLIES 11
PavanKumar
Responsive Resident
Responsive Resident

Hi @Mehta_Tech 

 

Please watch this Shane Young video (@Shanescows )

It really covers the subject well.

 

Please click Accept as solution 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 Thumbs Up.

 

Regards

Pavan Kumar .G

LaelH
Advocate III
Advocate III

On your nested products gallery, wrap the entire "Items" property in

 

Search( [your original products gallery items] ), ProductsSearchBoxName.Text, "Product Name")

 

It won't dynamically filter the Clients too, but it will filter your products. So you will get all clients and only products matching your search. 

I already test it but it doesn't work .

my problem is when i search the products only see the parent gallery item with that product.

in the screenshot you see there is two textbox 1st box search customer(parent gallery) 2nd box search product( child gallery) but when i search for a product gallery only show me that relate product that customer have and my customer list and product list both are relational so could you help me.

If I understand you properly, when you search for "cable dlink Cat6" in your product search box, then you only want to see the one client "The Nawangar Co-Operative Bank" who has ordered that product??  I have not managed to get that right.   I still see all my clients, but all products are filtered out other than  "cable dlink Cat6".  Will watch with interest to see if you get it right.

LaelH
Advocate III
Advocate III

I think I have a solution for you. I managed to get it working my side. 

It is hard to explain but  in essence you need to add filter to the "items" property of your parent or Client gallery as follows:

Filter(<your client or parent datasource> , CountRows(Filter(<your child or product data source>, <your child or product related id  >= <your  parent or client datasource>.[@<your parent or client related id>] && <your child or product search text box name>.Text in <your child product field name from your child data source>)) > 0)
 
If you send me the code from both your Parent and Child gallery Items property, I'll send back the code you need to replace it with.
Regards
Lael
Mehta_Tech
Helper I
Helper I

here i attached my code image please find it.

when i search for product that only see me that parent record with that record.

but i put all the filter function to the parent gallery that work on child too.
i show multiple filter video of @rdorrani  is best but it doesn't work in child parent relational gallery.

LaelH
Advocate III
Advocate III

I can't open those png's for some reason. Just copy and paste your code here.

LaelH
Advocate III
Advocate III

Sorry - that was a bandwidth glitch. We have massive power problems here so I am operating of 3G. Anyway, I got your png's downlaoded.

 

Place this in your “Challan List” Gallery "Items" property

Search(Filter(‘Challan List’ , CountRows(Filter(‘Challan Details’, CListID = ‘Challan List’.[@ID] && Searchbox_Products.Text in Title)) > 0), SearchBox.Text , “CustomerName”)

 

Place this in your “Challan Details” Gallery "Items" property

Search(Filter(‘Challan Details’, CListID = Thisitem.ID), Searchbox_Products.Text, “Title”)

 

Just a quick note to add: When using Search instead of filter, you can add multiple fields to search, and PowerApps will search all of them, so for example this last statement could become:

Search(Filter(‘Challan Details’, CListID = Thisitem.ID), Searchbox_Products.Text, “Title”,"ProductDescription", "ProductCode", "ProductColour")

 

Screenshot (40).png

Screenshot (39).png

  

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,863)