Using manual SharePoint fill-in choice values in your PowerApp

If you’re using a SharePoint choice field you can set the ‘Allow fill-in choices‘ (or ‘Can add values manually‘ in modern) option to yes.

This will give users the opportunity to manually specify a value for the choice field if the given values are not sufficient. E.g. when a user want to request a brush, but the only available choices are:

  • Pencil
  • Paper
  • Ruler
  • Eraser

The user can manually specify ‘brush’ and that will be saved to the list:

But when you create a PowerApp and select that same field, users won’t be able to manually specify a value anymore:

In this blog, I will explain how you can allow fill-in choices within your choice fields in PowerApps.

SharePoint configuration

First of all, you will need a choice column that allows fill-in choices (obviously). That’s the only thing you need to configure in SharePoint.

PowerApps configuration

Your PowerApps configuration takes a little more effort. There are multiple ways to achieve this and I will explain it by using the SearchText property.

First, you need to make sure the ‘Allow searching‘ option is enabled (which is by Default) on the choice field in your PowerApp by selecting your dropdown control and enabling Allow searching in the Properties pane.

With that option enabled, users are able to search the dropdown by entering a value which will search for that specific value. Since your have user input with this option, you can also use this to store that value into your list item. You can achieve this by adding the following function to the Update() property of your DataCard:

            Value: DataCardValue2.SearchText,
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"

Breaking this down into smaller pieces:

  • If(!IsBlank(DatacardValue2.Selected),DatacardValue2.Selected will check if there is a value selected in the dropdown. If so, this value will be used to store within the item.
  • If(!IsBlank(DatacardValue2.SearchText) if there is no value selected in the dropdown, this will check if there is a value entered manually by the user, using the SearchText property.
    • If so, this value will be stored, using the following record value: {Value: DataCardValue2.SearchText,’@odata.type’: “#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference”}
    • If not, a blank value will be stored using the Blank() function. If your choice field is set to Required, this will make sure no empty value will be stored. If your choice field is not required, you can skip the second If() statement and just enter the record value as stated above as your false expression.

When you have everything into place, your fill-in choice is ready for use:

You can also configure an ‘Other’ choice value and when that value is selected, a text-box appears where users can enter their value manually. This may be a bit more user friendly, but also a bit more configuration on the PowerApps side. Please contact me if you want to know more about that solution.

Leave a Reply

Your email address will not be published. Required fields are marked *