cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PavelB
Frequent Visitor

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
Frequent Visitor

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
mdevaney
Super User
Super User

@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?

v-xida-msft
Community Support
Community Support

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
Frequent Visitor

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

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.

Users online (2,408)