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
Solved! Go to Solution.
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.
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.
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?
Yes, Jeff's solution works fine, thank you for the support!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
194 | |
95 | |
63 | |
61 | |
58 |
User | Count |
---|---|
245 | |
165 | |
91 | |
76 | |
76 |