I need to put data to ComboBox SearchText property, so that it initially appeared with some text in it. Tried to do this from Screen.OnVisible but nothing happens. No error. Could it be that it overwrites after that with some defaults? Or is it not possible to assign data to ComboBox SearchText apart from typing in?
Solved! Go to Solution.
OMG, I think I got it! When the option does not exist I create it with a Table() in a ComboBox.DefaultSelectedItems. I mean I still have no idea why I can't put text to SearchText property but I don't need it. Thank you for inspiration!
OMG, I think I got it! When the option does not exist I create it with a Table() in a ComboBox.DefaultSelectedItems. I mean I still have no idea why I can't put text to SearchText property but I don't need it. Thank you for inspiration!
Hi @AnastasiaD ,
What's the Items property of your combo box?
I did a test on my side, you can refer to my formula.
1. I have a combo box to search users using Office365Users connector, here is the formula I used before:
Office365Users.SearchUser ({searchTerm: combobox1.SearchText})
2. To set a default search text for this combo box, I change the formula to below, just add a condition to check if its SearchText is blank:
If(IsBlank(combobox1.SearchText), Office365Users.SearchUser ({searchTerm: "allen"}),Office365Users.SearchUser ({searchTerm: combobox1.SearchText}))
Best regards,
Allen
Hello, Allen!
Items are a filtered set of records from a SharePoint table. It is a part of scenario when user can either fill a new form (using both ComboBox options and ComboBox free entry which is SearchText), or edit a previously entered form - and here is when I need to fill ComboBoxes with its previously entered options or previous free entry. So I have no problem to put the required option to ComboBox.DefaultSelectedItems. But I can't put free entry back to ComboBox.
Does it make sense? 🙂
Thank you
I need it to stay in a ComboBox as a text, not as a clue to items, because if it was previously entered as free text then it means that this search did not bring any items from existing ComboBox options.
Have no problems with putting text to Combobox.InputTextPlaceholder, so I might use it as a workaround but it looks weird.
Hi @AnastasiaD ,
I tried to understand your scenario but failed. I am confused about your requirement now..But from the usage of text in InputTextPlaceholder, I think you just want to have a default text that will not lose even when you re-select another selection(or do other action). If so, seems using InputTextPlaceholder is a good solution(I have tried to use variable but cannot get a satisfied result).
Best regards,
Allen
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
197 | |
68 | |
48 | |
43 | |
20 |
User | Count |
---|---|
257 | |
123 | |
83 | |
76 | |
69 |