cancel
Showing results for 
Search instead for 
Did you mean: 

SharePoint Choice - Fill in option

Well it seams like when PowerApps was created as the new custom form for SharePoint somehow the ability to have fill in options for Choice fields was forgotten. 

 

I see there are requests people have entered for This option but I don't know that anyone created an "New Idea" for it since that was requested even yesterday.

 

To me this is a show stopper for a number of forms I am creating for SharePoint. I really hope this can be implemented soon.

Status: New
Comments
Level 8

I have found a workaround for the problem:

 

When using the choice field inside a form,

 

  1.  Unlock the Datacard for editing
  2. In the "Update" value, put in this code:
    If(Not IsBlank(DataCardValue.Selected); DataCardValue.Selected;{Value: DataCardValue.SearchText; '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"})
  3. This way, the form will use a selected value if there is one, or it will use the entered text ("SearchText") if there wasn't a value for this text in the list.

Not very pretty, but it works...

Level: Powered On

I tried the suggested workaround in the comment above, but it didn't work for me. The formula first wouldn't resolve until I changed the semicolons to commas, but even after it resolved, it still wouldn't take what was typed in the search box and threw an "invalid entry" error. I've got a choice field that also allows multiple selections, but I did change "Selected" to "SelectedItems."

Level 8

@dhock:
Yes, the semicolons are a result of the autotranslation feature of PowerApps studio (which I really hate...).

 

I didn't do that with a multiselection, but I think your problem might be that the else value (third paramter) has to be an array in your case. Maybe something like this is going to work (notice the brackets around the object):

If(Not IsEmpty(DataCardValue.SelectedItems), DataCardValue.SelectedItems,[{Value: DataCardValue.SearchText, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}])

 

If this isn't going to work, maybe the value inside the object has to be the array (notice the subtle difference for the bracket locations):

If(Not IsEmpty(DataCardValue.SelectedItems), DataCardValue.SelectedItems,{Value: [DataCardValue.SearchText], '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"})

 

 

Level: Powered On

Thanks very much for the help, @AlexN! Tried both but still not working. Is it because of the array that you also changed IsBlank to IsEmpty?

Level: Powered On

I've run into this issue also. SharePoint list set up as choices, but allow fill-in. Can perform the action in the list but can't perform the action in the PowerApp.

 

Update: I was able to get it to work using AlexN's formula in the update field:

 

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

 

* # is the DataCardValue number (e.g. DataCardValue10.Selected)

** make sure when you copy/paste, you change the semicolons to comma's.

Level 8

Hi All,

 

I tried this solution, the form is working without error, but when I checked a new value added from the PowerApp form, the Data not stored into the Sharepoint List. Any suggestion?

 

Thanks,

Level: Powered On

.

Level: Powered On

Hi All,

 

I tried this solution,  checked a new value added from the PowerApp form, the Data not stored into the Sharepoint List. Any suggestion?

 

Thanks,

rys
Level: Powered On

Doesn't work for me.

rys
Level: Powered On

Got this working - forgot to check allow custom choices in the sharepoint list. Thanks!