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

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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