Aug 01 2016 10:05 PM
Hi all,
If you've tried to create a PowerApp that filters or searches on a choice field in a SharePoint list, you may have found that it doesn't work. This is because today, PowerApps expects the filtered/searched fields to be text fields.
I found a simple work-around for this by using a Calculated field in SharePoint for the choice field as PowerApps treats calculcated fields as text fields. In the example below, the field I'm interested to search on is a choice field called bugStatus. Instead, my PowerApp uses bugStatusValue in its search field.
Aug 02 2016 12:04 PM
Can PowerApps write the value back to the Choice Field at all?
Aug 02 2016 01:27 PM
Sep 06 2016 05:09 PM
I beleive at this time it is not possible.
Sep 13 2016 11:42 PM
Thanks for sharing this tip. It saved me some headache!
Sep 20 2016 08:38 PM
Sep 30 2016 09:35 AM
The other way I've found doing it, is using a new Entity within the CDM and use that as the choice field. When filed is updated in PowerApps, write the value back into SahrePoint Text Field.
Mar 21 2017 11:44 AM
Using the web editor I can't display a SharePoint Choice column on the browse screen.
I used the Calculated Column trick and it worked.
And technically the CHOICE field IS TEXT... What the HECK!
I also had to do the same trick to get the app to sort by date.
Thanks for the trick!
Apr 13 2017 03:13 AM
Append you field with .Value and It'll work.
CountRows(Filter(YourList, YourChoicefield.Value = "OK"))
Thanks
Aug 29 2017 09:37 AM
Thanks Raouf!
Just what I was looking for. This worked great! No need for an additional column.
Dec 23 2017 03:04 PM
I've tried both the ChoiceColumn.Value and Calculated Column alternative and both indeed work for me except I am getting the blue dot/blue squiggly line warning about delegation. As I understand it, it works in test now, but when the list grows over 500 records, it will break. So I need an alternative. The only one I can think of it to use a workflow to copy the Choice field into a text field in SharePoint and put an index on that field. That will certainly work and avoid delegation, but is smacks of a hack. Are there any other solutions? For those who need to see code to understand, this is the phrase that is causing the delegation issue for me.
Filter('Store Task Template',Status.Value="Complete")
Jan 26 2018 12:41 PM
Curious if anyone has revisited this since December. I tried the calculated column trick. When I do it, I get the blue dot, PLUS the filter doesnt work!
Additionally, if you use the .VALUE trick, it just says invalid name, and doesnt even let you use it.
Did something change?
@Deleted wrote:
I've tried both the ChoiceColumn.Value and Calculated Column alternative and both indeed work for me except I am getting the blue dot/blue squiggly line warning about delegation. As I understand it, it works in test now, but when the list grows over 500 records, it will break. So I need an alternative. The only one I can think of it to use a workflow to copy the Choice field into a text field in SharePoint and put an index on that field. That will certainly work and avoid delegation, but is smacks of a hack. Are there any other solutions? For those who need to see code to understand, this is the phrase that is causing the delegation issue for me.
Filter('Store Task Template',Status.Value="Complete")
Jan 26 2018 01:29 PM
Yes, I just retested both methods (Filtering on a choice column as well as on the calculated column). No change. Both work and both display the blue dot and blue squiggle in the code indicating delegation issues. I cannot really put this app into production because I will hit 500 records in about 2 days, at this which, I would have egg on my face.
Apr 09 2019 09:54 AM
All,
I recently have started to see this issue, again. I fixed it by using the calculated field trick, but my list got too long,and thus crashed it. Now, for another list, I am searching through an actual choice column; which somehow hasn't crashed, or thrown any errors.
Has anybody got a better fix than random miracles?
Apr 09 2019 01:07 PM
Jun 06 2019 09:17 AM
Oct 22 2019 09:36 AM
Hello All...
Oct 16 2022 09:54 AM
@Anderson_BR Before I put the code on the "OnChange", do I need to something else? I have a choice column with dropdown menu (Yes, No) on Sharepoint list. I created an edit form based on this list but the dropdown menu didn't work. Any helps are appreciated. Thank you.