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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,530)