cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
illmatic
Helper IV
Helper IV

ComboBox in SP Edit Form does not yield Values

I am having an issue using a combobox for multiple choice with search enabled on a SharePoint list form.   The values selected in the combobox are not saved after submission.  The field in the SP List is simply blank. I have done extensive research on this forum and others, but can't seem to get to the bottom of it and suspect it's a minor error I am overlooking.  I've tried multiple ways to achieve the result I want to no avail.   My latest attempt, I have simplified the list entirely with the following options:

 

  • The OnNewOnEdit properties on SharePointIntegration, I added the function ClearCollect(EndUseCols, EndUse) to create a variable which holds the data from my external SP list that populates the Combobox options.
  • The SP list has two fields, both single text.
  • The single text field I have converted to the combobox is called EndFormat.
  • I have saved the textbox name [DataCardValue2], deleted it from the data card, and placed a combobox in its place entitled DataCardValue2.
  • I've set the Items property on the combobox to: EndUseCols.Title, and the Update property to Concat(DataCardValue2.SelectedItems, Title, " ,")  

There are no errors in the form, but I still don't see the values being saved.   Thanks in advance for the help.

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @illmatic ,

What is the Update property of the DataCard the box is in?

Hi @WarrenBelz,

Thanks for your message.. I mentioned this above:

I've set the Items property on the combobox to: EndUseCols.Title, and the Update property to Concat(DataCardValue2.SelectedItems, Title, " ,")  [this is the Update property on the data card.  I used the Concat function so that the data from the combobox can be rendered as text values since the datacard was initially a single text field].

@illmatic ,

Why don't you simply put the Choice fields in SharePoint, leave the Items at Choices([@ListName].FieldName and let the card Update take care of itself with the standard settings?

When writing back manually to a multi-select Choice field, it is actually expecting a Table, not a Record and is a level of complexity you do not need unless you absolutely have to, particularly on an Integrated app.

@WarrenBelz :

 

I had that initially, but was having issue with that as well.  I actually need three different multiple selection fields.  Doing as you indicated above, for whatever reason, here is what I found:

1.) One of the multiple choice fields worked without needing to do any kind of edits in PowerApps at all.

2.) Another utilized the recommended option above, but the options did not save back to the form and rendered blanks.

 

I am now trying different scenarios in a test form before I apply the final best option to the actual app.

 

 

Thanks @illmatic ,

Here is a post with the suggested solution - I have never attempted (or needed to do) this, but is makes sense to me the way this is presented. It is a ForAll Loop inside a Patch (you are writing to a Table inside a field), so you will need to understand the concept of this before translating it to your needs.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

Thanks this is for patching to a text field.  I understand how to do that.  What I'm unsure of is why none of the possible scenarios to make this form work as is seem to be working per the tutorials I've read with an edit form.

 

For instance, patching should not be necessary in this scenario.  I've changed the text field only on the NewForm and the EditForm to the combobox.  The values should [per the tutorial] update on the backend without the need to patch because the text field data card has the same name as the combobox.

 

What seems to be an issue for me no matter the scenario is that when changing the combobox to allow multiple choice values, the 'Items' property and 'Update' property from my understanding should be DataCardValue#.SelectedItems.  Instead I get thrown an error that it should be a Record not a table. Even when using a standard SP choice column with 'multiple values' turned on, PowerApps by default uses DataCardValue#.Selected.    Why?

 

Hi @illmatic ,

Look at the second part of the solution - it is to a multi-choice field

PatchMultiChoice.png

If you do not change anything (simply let Power Apps add the control to the form as + Add Field) I have found you do not need to change any code. I have never explored the reason for this to be honest. To explain the issue however, any Choice field is a record (not Text). Once it becomes multi-choice, you add another dimension and it becomes a Table, hence the ForAll in the suggested solution.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

@WarrenBelz 

 

yes, warren.  I made the correlation, but it wasn't what I was looking for-- as I didn't want to know how to transfer the information.   The issue I was looking to resolve, specifically, was why the field was blank with the options I am already using. Basically, is there something wrong with the functions and/or formula I have already done. In theory, based on the searching I've done as well as various tutorials & specifically multiple tutorials that suggested this tactic, there wasn't a need to patch the data at all.  The combobox was only viewable on the NewForm and EditForm, had the same name as the original text field name, and should have been saved without the need to use the Patch function which can be a bit exhaustive given the amount of fields I'd need to do this for in the form...   I imagine, since I already have multiple screens, that this may make load times slower and PowerApps already tends to run on the slower side on our network with just minimal features for whatever reason.

 

Anyway, I also understand that dropdowns are saved as a record, presumably, if multiselect isn't turned on.  This is why in the example above -- to ensure the output of the dropdown is saved as a textvalue if it is going to a text field -- I used the Concat function.   What is confusing to me is that whether or not the dropdown/combobox is recognized as a table or record is temperamental.  I tested the choice columns -- 3 -- all of which had multiselect enabled, and 2/3 fields were saved as tables which meant their Items property read as FieldName.SelectedItems.  One of them was saved as a record and not a table for no rhyme or reason.

 

Thank you for your insights :).  

Thanks @illmatic ,

I will be honest on (particularly) Combo Boxes, there is always a way to manage the data displayed and written, particularly where the data source field may be something different to what is presented for choices and/or displayed. It may not make logical sense at times reading the specs, but is always manageable.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,367)