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

Filter listbox from ComboBox

Dear All,

 

I have a combo box that required multiple selections from user as shown in picture below:

 

Batrisyia__0-1603111611072.png 

and this is the coding:

 

Sort(
Distinct(
Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System'= Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE'= Dropdown5_1.Selected.Result,
COMPONENT= Dropdown6_1.Selected.Result
),
'OPERATING TEMP (°C)'
),
Value(Result),Ascending
)

 

However, I'm trying to filter it in list box, it shows one type of material instead of all selected type of material if i used coding below:

Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System' = Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE' = Dropdown5_1.Selected.Result,
COMPONENT = Dropdown6_1.Selected.Result,
'OPERATING TEMP (°C)' = ComboBox4.Selected.Result)

 

Batrisyia__2-1603113629470.png

 

or it returns to error when change it to SelectedItems:

Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System' = Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE' = Dropdown5_1.Selected.Result,
COMPONENT = Dropdown6_1.Selected.Result,
'OPERATING TEMP (°C)' = ComboBox4.SelectedItems.Result)

 

Batrisyia__1-1603113373684.png

 

Any idea how to handle this? Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User II
Super User II

Hi @Batrisyia_ ,

 

Although, this is not the solution (because I guess that you work with Sharepoint list and you'll received a delegation warning due to the in usage), did you try  ?

Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System' = Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE' = Dropdown5_1.Selected.Result,
COMPONENT = Dropdown6_1.Selected.Result,
'OPERATING TEMP (°C)' in ComboBox4.SelectedItems.'OPERATING TEMP (°C)')

 

Selected - gives you the last combobox selected item.

SelectedItems - gives you all selected items and you want to see the 'OPERATING TEMP (°C)' column ...

View solution in original post

3 REPLIES 3
gabibalaban
Super User II
Super User II

Hi @Batrisyia_ ,

 

Although, this is not the solution (because I guess that you work with Sharepoint list and you'll received a delegation warning due to the in usage), did you try  ?

Filter(
Mastercopy_1,
SYSTEM = Dropdown1.Selected.Result,
'Sub System' = Dropdown4_1.Selected.Result,
'EQUIPMENT TYPE' = Dropdown5_1.Selected.Result,
COMPONENT = Dropdown6_1.Selected.Result,
'OPERATING TEMP (°C)' in ComboBox4.SelectedItems.'OPERATING TEMP (°C)')

 

Selected - gives you the last combobox selected item.

SelectedItems - gives you all selected items and you want to see the 'OPERATING TEMP (°C)' column ...

View solution in original post

Hi @Batrisyia_(again) ,

So to avoid delegation warning, with a little bit more resources consume, you need to use a "temporary" collection in  OnChange property of the combobox. 

ClearCollect

           (ourTemporaryCollection,

           Filter(
                    Mastercopy_1,
                                  SYSTEM = Dropdown1.Selected.Result,
                                 'Sub System' = Dropdown4_1.Selected.Result,
                                 'EQUIPMENT TYPE' = Dropdown5_1.Selected.Result,
                                COMPONENT = Dropdown6_1.Selected.Result

                   )

     )

 

and set the items property of list control to:

Filter(ourTemporaryCollection,'OPERATING TEMP (°C)' in ComboBox4.SelectedItems.'OPERATING TEMP (°C)').

in this way the filter will be executed on client side.

Hi, thank you for the suggestion and it works. Thank you very much!

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,162)