I have a gallery connected to a SharePoint list. I have add a search box to this gallery. Currently the search box works but it only searches on the Title field. I also want to search in another column named Achternaam (Last name). The results will be soredt by achternaam, ascending. How do i edit the formula so it also searches the Achternaam column?
The formula i now use is: SortByColumns(Filter(CachedLunchlijst, StartsWith(Title, Zoeken.Text)),"Achternaam",Ascending)
Solved! Go to Solution.
There was a similar question asked: https://powerusers.microsoft.com/t5/General-Discussion/Searching-on-multiple-fields-or-columns/td-p/...
In your instance, I would try: Sort(Search('CachedLunchlijst', Zoeken.Text, "Title", "Achternaam"), "Achternaam", Ascending)
The only downside to this solution that is it requires all the fields that you want to search to be in a text format previous to using the formula. If you try to convert it using .Value or Text(variable) or Value(text) or any other way in the formula, then errors will occur. Hope this helps.
@Anonymous
You might try:
SortByColumns(
Filter(
CachedLunchlijst,
StartsWith(
Title, Zoeken.Text ||
Achternaam = Zoeken.Text)),
"Achternaam",Ascending)
There was a similar question asked: https://powerusers.microsoft.com/t5/General-Discussion/Searching-on-multiple-fields-or-columns/td-p/...
In your instance, I would try: Sort(Search('CachedLunchlijst', Zoeken.Text, "Title", "Achternaam"), "Achternaam", Ascending)
The only downside to this solution that is it requires all the fields that you want to search to be in a text format previous to using the formula. If you try to convert it using .Value or Text(variable) or Value(text) or any other way in the formula, then errors will occur. Hope this helps.
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 |
---|---|
199 | |
71 | |
49 | |
41 | |
30 |
User | Count |
---|---|
266 | |
121 | |
95 | |
90 | |
81 |