cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kris_vin
Regular Visitor

Combobox value is Not getting Saved in SharePoint List

Hi, 

I am facing an issue with PowerApps ComboBox control.

 

We are trying to change the SharePoint default form and create a PowerApps form. We have a combo box which is taking value from another list (I changed the item property of Combobox1 to this (SortByColumns(Filter(CategoryCollection, 'Content approval status'="Approved"), "Title", Ascending).Title) ). Combo box is working as expected , we can see the values based on the filtering criteria. 

 

However, When we save the data to the SharePoint list , Combobox1 value is not getting saved. 

 

Can anyone please help us?  Appreciate your help 

 

Please let me know if you need any additional information. 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kris_vin ,

Could you please share a bit more about the LookUp type column in your Main SP List? Do you enable "Allow multiple selections" option for this LookUp field in your Main SP list?

Does the LookUp field reference values from the Title field in your Categories SP List (second SP List)?

 

If you have enabled "Allow multiple selections" option for this LookUp field in your Main SP list, I think there is something wrong with your formula.

 

Please consider set the Update property of the LookUp field Data card in your Edit form to following:

ForAll(
       ComboBox1.SelectedItems,
       {
         Id: ID,
         Value: Title
       }
)

Note: I assume that the LookUp field references values from the Title field in your Categories SP List (second SP List)

 

In addition, please set the DefaultSelectedItems property of the ComboBox to following:

ForAll(
       ThisItem.LookUpField,
       {
         Title: Value,
         ID: Id
       }
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

15 REPLIES 15
WarrenBelz
Super User III
Super User III

Hi @kris_vin ,

One question before I attempt a solution for you - what type of field is the target in your list (Text/Choice/Lookup/Other)?

@WarrenBelz  

 

Thanks for the reply. It's a Single Line text field 

 

FYI 

I am saving the second list values in a Collection and using the values from collection in the combobox  --- ClearCollect(CategoryCollection,Categories)

 

Thanks 

Thanks @kris_vin ,

This should be an easy one -

If the Items of the ComboBox are

SortByColumns(
   Filter(
      CategoryCollection, 
      'Content approval status'="Approved"
   ), 
   "Title", 
   Ascending
).Title

set the Update of the DataCard containing the ComboBox to

ComboBox1.Selected.Title

 

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.

v-xida-msft
Community Support
Community Support

Hi @kris_vin ,

Which column do you use as Display column value within the ComboBox? Title column?

Which type column do you use to store the ComboBox Selected value in your Main SP List? Choice type or Single Line of Text type column?

 

Please set the Items property of the ComboBox to following:

SortByColumns(
              Filter(CategoryCollection, 'Content approval status'="Approved"), 
              "Title", 
               Ascending
).Title

 

If you use Single Text type column to store the ComboBox Selected value, please set the Update property of the field data card (which contains your ComboBox) to following:

ComboBox1.Selected.Title

 

If you use Choice type column to store the ComboBox Selected value, please set the Update property of the field data card (which contains your ComboBox) to following:

{
  Value: ComboBox1.Selected.Title
}

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-xida-msft for the addition to my solution.

Thanks @WarrenBelz

 

Unfortunately that didn't work. I changed the update property of the code to  ComboBox1.SelectedItems.Title    and it's still not saving data. 

-->Combo box is multi select enabled

--> Main SharePoint list field where I am saving this data is a LookUp column 

Thanks @v-xida-msft 

 

Which column do you use as Display column value within the ComboBox? Title column?

-->Title Column (

Which type column do you use to store the ComboBox Selected value in your Main SP List? Choice type or Single Line of Text type column?

-->LookUp Column 

 

I tried your solution, that didn't work. 

 

Thanks

@WarrenBelz  @v-xida-msft  @mdevaney 

 

I tried below code in the Update Property of the data card. Value is getting saved now, but the issue is, only one item is getting saved in the Main SharePoint list. Combo box is multi select enabled and when i try to save multiple items, only one item is saving. 

Main SharePoint list field where I am saving the combo box values is a LookUp column 

 

Combo-box data card Update property 

{

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

    Id:Text(ComboBox1.Selected.ID,"[$-en-US]0"),

    Value:ComboBox1.Selected.ID

}

 

Thanks 

@WarrenBelz 

 

I am so sorry. I gave a wrong answer for your question. Target Field is lookup 

 

Thanks 

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (29,957)