I have a very simple powerapps application which enables managers to enter some information into a SharePoint list.
In order to make it easy for them (and myself) I set up many of the columns as "Choice" fields which present a Dropdown box to the manager with the limited choices they have to populate the field (Example: Under the "Locations" column they can choose North, South, East or West). They cannot add other choices.
Now, in the Powerapp itself, when I go to set some search functionality in the "Search" field at the top, Powerapps will not accept any of the Choice (dropdown) fields to search on.
This is the default forumula in the "Search" box, in the forumula bar, with the gallery selected and "Items" as the property choice:
SortByColumns(Filter('Safety Concentration Time Tasks', StartsWith(ComplianceAssetId, TextSearchBox1.Text)), "ComplianceAssetId", If(SortDescending1, Descending, Ascending))
My question is am I thinking about this the right way OR is there a forumla which will search those "choice" columns?
Thanks
For anyone who didn't figure follow the 'add columns' suggestion...I tried
Search(AddColumns(Profile_Partners, "newColumn", PlainText(Country)), TextInput3.Text, "new_profilename", "newColumn")
and this works, now I can search my choice column from a table in dataverse. Basically replace the 'table' argument with the add column() function to create a 'new' table as an argument for the search and then search on the new column.
I am a deleted reply. Hi.
My solution to this was to add a "Calculated (calculation based on other columns)" column in SharePoint with the formula "=[*Desired column to search in Power Apps*]" as a single line of text. Then reference that new column in Power Apps.
In my case, I needed to search the "Make" column (Apple, Lenovo, HP) which was a choice column in SharePoint and that would not be allowed. The new single line of text calculated column in Sharepoint, named "Make2", then was able to be added to my default formula for my gallery.
Hope this helps!
Thanks, I'll give it a look.
Hi RK1,
Thanks for replying.
You may wish to visit this thread I just posted: https://powerusers.microsoft.com/t5/Building-Power-Apps/SharePoint-Lists-Powerapps-won-t-search-quot-Choice-quot-Field/td-p/104473
Hardit explained how to get AddColumns to work.
Hope it helps.
Hi,
No, I didn't get it to work, but I ended up changing to a text type column, but I used a drop down style input in powerapps to turn the text into a "Choice" kind of . Does that make sense?
Hi RK1,
Just wondering if you managed to get the AddColumn to work?
I am also experiencing the same error of trying to search values from a Choice column in SharePoint.
I would be very grateful if you could shed some light.
Thank you.
Hey Matt,
Where do you put this AddColumns function in regards to text function? I currently am trying to search a text and choice. I currently have the function:
Search('Room 110 list',txtSearchbox.Text,"Title")
which works, but I also want to add a choice column, so in theory, I'd want:
Search('Room 110 list',txtSearchbox.Text,"Title"," Shop")
Where Shop is a choice in my SharePoint. I think I need to use the function you mentioned "AddColumns" to this to make it work, if I understand you correctly
Hey Stuart,
The way that I got around this was by using the AddColumns function to run a calculation on the non-text field and turning it into a new field that was a text item. Then I could use Search on the newly created field.
AddColumns(myTable, "newColumn", PlainText(oldColumn.value))
Hi Asri, rather old thread, but did you even find a solution?
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional