cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PavelB
Level: Powered On

Combo box

Hello,

 

I am having problems with a Combo box in my app. I have a gallery which is connected to a SQL DB and 3 combo boxes which filter this gallery. Everything is working perfectly except if I select more than 1 option from 1 drop box. Then the gallery is refreshed only with the latest selected value. I am filtering the gallery the following way: MRPFilter.Selected.Result in 'MRP controller' where mrpfilter is my combo box and the 'MRP Controller' is my column in the gallery. I have tried the concat operator as well: Concat(MRPFilter.Selecteditems; result;", ") in 'MRP controller' and still nothing. If I select more then 1 option the gallery shows as empty.

Just to clarify the problem: If in the combo box I have the values 1 and 2 and I select both of them, the result will be filtered only by one of them.

 

Thank you very much in advance for your help!

Regards,

Pavel

1 ACCEPTED SOLUTION

Accepted Solutions
PavelB
Level: Powered On

Re: Combo box

Hello,

 

I've managed to figure it out on my own. I just had to change the sides of the column and filter values. So when I change the formula from Concat(MRPFilter.Selecteditems; result;", ") in 'MRP Controller' to  'MRP Controller' in Concat(MRPFilter.Selecteditems; result;", ") everything went perfectly fine.

 

Thank you very much for the prompt reply.

 

Regards,

Pavel

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Combo box

@PavelB 

Could you please share the full formula you are using the Items property of the Gallery?  I assume this is where you are performing the filtering, correct?

Community Support Team
Community Support Team

Re: Combo box

Hi @PavelB ,

Could you please share a bit more about the data structure of your SQL Table?

Do you store multiple values separated with ',' within the 'MRP controller' column in your SQL Table?

 

1. If the 'MRP controller' column only store a single one value in your SQL Table:

I think there is something issue with your Filter formula, please consider modify your formula as below:

Filter(
'[dbo].[YourSQLTable]',
If(
IsBlank(MRPFilter.Selected.Result),
true,
'MRP Controller' in MRPFilter.SelectedItems.Result
)
)

 

2. If the 'MRP controller' column stores multiple values separated with ',' in your SQL Table:

Please consider modify your Filter formula as below:

Filter(
'[dbo].[YourSQLTable]',
If(
IsBlank(MRPFilter.Selected.Result),
true,
Left(
Concat(MRPFilter.SelectedItems, Result & ","),
Len(Concat(MRPFilter.SelectedItems, Result & ",")) -1
) in 'MRP Controller'
) )

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PavelB
Level: Powered On

Re: Combo box

Hello,

 

I've managed to figure it out on my own. I just had to change the sides of the column and filter values. So when I change the formula from Concat(MRPFilter.Selecteditems; result;", ") in 'MRP Controller' to  'MRP Controller' in Concat(MRPFilter.Selecteditems; result;", ") everything went perfectly fine.

 

Thank you very much for the prompt reply.

 

Regards,

Pavel

View solution in original post

Community Support Team
Community Support Team

Re: Combo box

Hi @PavelB ,

Have you solved your problem?

Is the solution I provided for you helpful in your scenario?

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (3,933)