cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mirkos
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
Jeff_Thorpe
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
Jeff_Thorpe
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?

Mirkos
Frequent Visitor

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

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,401)