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.

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.

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:

If(
    !IsBlank(DataCardValue2.Selected),
    DataCardValue2.Selected,
    If(
        !IsBlank(DataCardValue2.SearchText),
        {
            Value: DataCardValue2.SearchText,
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
        },
        Blank()
    )
)

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.

Previous articleBuilding a secure remote access solution using Azure Bastion Host
Next articleGetting Started with Microsoft Teams Administration
avatar
My name is Rik de Koning and I work as a Functional Consultant for Portiva, which is one of the larger Office 365 implementation partners in The Netherlands. I started my career in 2011 as a SharePoint support engineer and in 2013, I went to become a SharePoint consultant where I did various projects on SharePoint Server 2010 and SharePoint Server 2013. In the last couple of years I started focusing more and more on Office 365, especially on SharePoint Online, PowerApps and Microsoft Flow. I like being challenged and for PowerApps and Flow being quite new, there are always some challenges when implementing these services. When I’m not working, I like spend some time with my family (girlfriend and son), hang out with friends, do some sports (like fitness, running, kitesurfing and snowboarding) playing videogames and just relax a little. If you have any questions, please do not hesitate to contact me!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.