cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
michalox12
New Member

Filtering gallery with 5 combo boxes and 3 Text Inputs

Hello everyone,

I have a question regarding gallery filtering with few comboboxes and text inputs. What is the best way to combine those elements as filtering tools for gallery? I'd like to have functionality that not all of them have to be in-use, for example 1st, 4th and 5th comboboxes and 2nd Text Input are filled, or many different variations including all combo boxes filled. 

 

I tried to do this with conditional formatting with 'if' and describe all possible condition but function text is terrible long, few pages in Word editor. Is there any easier way to get the correct result? 

 

Supplier, Material grade, Qualification part number, Forming method, SFC level are comboboxes, SMYS, Part thickness, Part weight are Text inputs.

screem.png

4 REPLIES 4
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @michalox12 ,

 

If you require a fast processing code I would suggest you can have logical table with permutation and combination but it will be a lengthy process to code but process will be faster.  

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

WarrenBelz
Super User
Super User

Hi @michalox12 ,

This is the syntax - you will need the control names and the xxxx output of the combo boxes

Filter(
   DataSource,
   (
      IsBlank(SupplierComboName.Selected.xxxx) ||
      Supplier = SupplierComboName.Selected.xxxx
   ) &&
   (
      IsBlank(MaterialComboName.Selected.xxxx) ||
      'Material grade' = MaterialComboName.Selected.xxxx
   ) &&
   (
      IsBlank(SFCLevelComboName.Selected.xxxx) ||
      'SFC Level' = SupplierComboName.Selected.xxxx
   ) &&
   (
      IsBlank(QualificationComboName.Selected.xxxx) ||
      Supplier = 'Qualification part number'= QualificationComboName.Selected.xxxx
   ) &&
   (
      IsBlank(FormingComboName.Selected.xxxx) ||
      Supplier = 'Forming method'= FormingComboName.Selected.xxxx
   ) &&
   (
      IsBlank(PartThickBox.Text) ||
      'Part thickness' = PartThickBox.Text
   ) &&
   (
      IsBlank(SYMSBox.Text) ||
      SYMS = SYMSBox.Text
   ) &&(
      IsBlank(PartWeightBox.Text) ||
     'Part weight' = 'PartWeightBox.Text
   )
)

 

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.

@WarrenBelz Thank you for the response

I tried to implement your formula, however if I use Selected.Result in place of Selected.Xxxx, it filters only by last chosen option from combo box. I'd like to have opportunity to choose few options from each CB and filters gallery with them all. 

 

What should be used instead of Xxxx? SelectedItems doesn't work with the formula proposed by you.

 

Thanks in advanc

Hi @michalox12 ,

You would need (example)

(
   IsBlank(MaterialComboName.Selected.Result) ||
   'Material grade' in MaterialComboName.SelectedItems
)

 but note that this is not Delegable.

 

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.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, 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!

Top Solution Authors
Top Kudoed Authors
Users online (2,596)