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

Combo Box doesn't find some items

Hi all,

I have a particular issue during searching items inside a combo box, let's me explain:

I have a combo box that retrieves items from a SharePoint List.

 

At the OnChange event i refresh the items property of combo box with the items retrieves from my query from the datasource.

 

This is my formula.

OnChange:

If(ComboBox1.SearchText="";UpdateContext({MyclientiFromSQL : DLC_ClientiFromSQL});UpdateContext({MyclientiFromSQL:Filter(DLC_ClientiFromSQL;StartsWith(RagioneSociale;ComboBox1.SearchText))}))

 

Combo Box Items property = MyclientiFromSQL

 

MyclientiFromSQL = At the OnStarts event contains the first 500 items of the SharePoint List

 

Notes:

"MyclientiFromSQL" It's a context variables and contains the items to show in the choice of combobox.

"DLC_ClientiFromSQL" = It's a Sharepoint list datasource.

 

After the OnChange event data that i have serched doesn't appears in the chioice of combobox.
But exists inside my SharePoint list, then if I search for example the word "ab" i found some results.
I thought that at the OnChange event  the combo box doesn't update the context variables MyclientiFromSQL therefore the items contains only the first 500 items defined inside the OnStart event.

 

This issue appears on 28/02/2019, and the only difference that i see it's the Power Apps version.

3.19014.8 to 3.19023.12 after some label description update.

 

Can you help me? It's some type of bug or not?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

The onChange event of the combo box only fires when you select or deselect a value. I think you can simplify the solution by removing the onChange code and change the Items property of the ComboBox1 to: 

 

Filter(DLC_ClientiFromSQL; StartsWith(RagioneSociale;ComboBox1.SearchText)).RagioneSociale

 

Give it a try and see if it solves your issue.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Super User
Super User

The onChange event of the combo box only fires when you select or deselect a value. I think you can simplify the solution by removing the onChange code and change the Items property of the ComboBox1 to: 

 

Filter(DLC_ClientiFromSQL; StartsWith(RagioneSociale;ComboBox1.SearchText)).RagioneSociale

 

Give it a try and see if it solves your issue.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Echoing @Jeff_Thorpe ,

.SearchText is the text that is typed into the combobox. Jeff's solution works because the search text in the filter is evaluated as you type.

 

@Mirkos, can you let us know if Jeff's solution worked for you?

Frequent Visitor

Yes, Jeff's solution works fine, thank you for the support!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,375)