Hi I have a data table that needs to get filtered on by multiple different dropdowns. Right now I have it setup so that all the filters work correctly, but it will always filter on all. What I want it to do is if I use one filter and 10 results come back, then use another filter, I want that second filter to only show me what's available from the pre filtered 10 results.
Example:
I first pick a category dropdown: boots
The next dropdown is color and boots only have colors red and blue while shoes category have colors yellow and green
Right now if I go choose boots on the first dropdown and then go to the second dropdown it will show all colors: red, blue, green, yellow. What I want is for it to take the first filter and apply it to the second so that it will only show red and blue if I pick boots.
This is the code I have currently for the items property of my data table:
Search(Filter('[dbo].[970_item_format_item_mast]',
(part_name = Gallery4.Selected.'Part Name') &&
(outerdd.Selected.Result = 0 || outer_diameter = outerdd.Selected.Result) &&
(innerdd.Selected.Result = 0 || inner_diameter = innerdd.Selected.Result) &&
(cross_sectiondd.Selected.Result = 0 || cross_section = cross_sectiondd.Selected.Result) &&
(Heightdropd.Selected.Result = " - " || height = Heightdropd.Selected.Result) &&
(mat_compounddd.Selected.Result = " - " || material_compound = mat_compounddd.Selected.Result) &&
(mat_compound_familydd.Selected.Result = " - " || material_family = mat_compound_familydd.Selected.Result) &&
(mat_manufacturerdd.Selected.Result = " - " || material_manufacturer = mat_manufacturerdd.Selected.Result) &&
(material_supplieriddd.Selected.Result = " - " || material_man_supplier_id = material_supplieriddd.Selected.Result)),'Part Number/Description Searchbox'.Text,"item_id","item_desc")
This is what I have setup for the onvisible property of that screen
ClearCollect(Parent_Cat, {Result: " - "});
Collect(Parent_Cat, Distinct('[dbo].[970_item_format_item_mast]',parent_category));
ClearCollect(Sub_Cat, {Result: " - "});
Collect(Sub_Cat, Sort(Distinct('[dbo].[970_item_format_item_mast]',sub_category),Result,Ascending));
ClearCollect(Out_Diam, {Result: 0});
Collect(Out_Diam, Sort(Distinct('[dbo].[970_item_format_item_mast]'.outer_diameter,outer_diameter),Result,Ascending));
ClearCollect(In_Diam, {Result: 0});
Collect(In_Diam, Sort(Distinct('[dbo].[970_item_format_item_mast]'.inner_diameter,inner_diameter),Result,Ascending));
ClearCollect(Cross, {Result: 0});
Collect(Cross, Sort(Distinct('[dbo].[970_item_format_item_mast]'.cross_section,cross_section),Result,Ascending));
ClearCollect(colheight, {Result: " - "});
Collect(colheight, Sort(Distinct('[dbo].[970_item_format_item_mast]'.height,height),Result,Ascending));
ClearCollect(colmat_compound, {Result: " - "});
Collect(colmat_compound, Sort(Distinct('[dbo].[970_item_format_item_mast]'.material_compound,material_compound),Result,Ascending));
ClearCollect(colmat_fam, {Result: " - "});
Collect(colmat_fam, Sort(Distinct('[dbo].[970_item_format_item_mast]'.material_family,material_family),Result,Ascending));
ClearCollect(colmat_man, {Result: " - "});
Collect(colmat_man, Sort(Distinct('[dbo].[970_item_format_item_mast]'.material_manufacturer,material_manufacturer),Result,Ascending));
ClearCollect(colmat_supid, {Result: " - "});
Collect(colmat_supid, Sort(Distinct('[dbo].[970_item_format_item_mast]'.material_man_supplier_id,material_man_supplier_id),Result,Ascending))