cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Combo Box issue

Hello there,

 

Quick question here:

 

I have a SPL with my customer orders, the customer name "Title" can be repeated in the list several times. After I added the combo box selector and search for my customer the combo box always retrieve the first record in my SPL that matches the name selected. For instance

 

I have

 

ID  Title

18  customer A

15 customer B

35 Customer C

80 customer A

 

If I select in my combo box Customer ID=80, my combo box always show Customer ID=18

 

Any idea?

 

Looking for help.

 

thanks in advance

 

Regards,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Combo Box issue

There are ways to Concatenate the name and the Quote to get them to show in the combobox as the search field.  But that's not easy to do.  You'll also probably run into the upper limit for items in a ComboBox fairly quickly.  Showing distinct values with a secondary selection would be much easier.

 

One other possibility would be to do two cascading dropdowns.  Here's a Video that explains how to do it.  Usually its done with two different lists, but the concept is the same. https://www.youtube.com/watch?v=pkZG2boN7jQ



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Combo Box issue

If the customer names are repeated, it advisable to use Distinct in the item property of the combobox1:   Distinct(Datasource,Title)

 

Then if you want to retrieve the title in a textbox use:
   combobox1.Selected.Result

 

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Dual Super User III
Dual Super User III

Re: Combo Box issue

A lot of this depends on how you are retrieving the list item based on the comboBox, but having it default to the first is quite common.  What you might want to do if you know there are multiple customers possible is to put a Gallery in the middle when selecting a particular customer.

 

1) Populate the ComboBox using Distinct() as @eka24 suggests

2) Filter the Gallery based on the ComboBox.SelectedText being equal to Title.  That should list all the matching customers from the list in the Gallery

3) Select a particular customer record from the Gallery to work on in a form.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Combo Box issue

Hi there,

 

Thank you very much for your prompt response,

 

However the after applied the distinct formula I can see only a single value, I mean

I have for instance

 

ABC Enterprises records 20,25,40,78 etc

 

In my list ABC Enterprises is listed once, and I need to be able to select like record 78.

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Combo Box issue

If you get the distinct name from the ComboBox and use that to populate a Gallery then you will see all the specific records for that customer in the gallery.  That's why I suggested the use of an intermediate Gallery.  The ComboBox at that point simply becomes a filter to get the specific records you are interested in.  I don't know any easy way to do that with a ComboBox alone.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Combo Box issue

Hi @Pstork1 @eka24 ,

 

Thank you both, make sense what you say about the second filter, I think that this should be achieved straight form the first filter.

 

I was testing and found this:

 

This is my combo box with the search fields and display fields "title" and "Quote"

That is exactly what I need. I need the user can find the quote based on both.

 

Capture6.PNG

 

but again this only retrieve the first item in the list regardless what I have selected.

 

Now this is the new combo box with this formula:

Sort(Customers, Title, Ascending)

 

Capture1.PNG

 

I am able to sort by name or even type the quote number, but could be a little difficult for the users knowing which one is the right customer

 

By in fact after I select a customer I am 100% right that I am choosing the correct customer:

 

Capture2.PNG

 

Capture4.PNG

 

Capture3.PNG

 

Capture5.PNG

 

I guess the only way is to add a second gallery.

 

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Combo Box issue

There are ways to Concatenate the name and the Quote to get them to show in the combobox as the search field.  But that's not easy to do.  You'll also probably run into the upper limit for items in a ComboBox fairly quickly.  Showing distinct values with a secondary selection would be much easier.

 

One other possibility would be to do two cascading dropdowns.  Here's a Video that explains how to do it.  Usually its done with two different lists, but the concept is the same. https://www.youtube.com/watch?v=pkZG2boN7jQ



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,847)