cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
godala_vamshi
Helper III
Helper III

Combo box values not saving in canvas app

Hello, 

 

I have a custom Combo box and Items are from SP list, I was able to select the values but when we try to add additional values(on 2nd visit on that record) and save, it only saving the newly selected value and removing the previous value.

Also combo box values are clearing when I update other fields on form and save.

 

For example: If I select below values and save for the 1st time, there is no issue. 

godala_vamshi_0-1637095388110.png

But then I comeback next time and add additional value as below and save/refresh, It is only saving new selected value.  

godala_vamshi_1-1637095414771.png

On Update : ForAll(DataCardValue3.SelectedItems,ApplicationName)

Default : ThisItem.AppInterfaces

 

Thank you very much in advance! 

12 REPLIES 12
WarrenBelz
Super User
Super User

Hi @godala_vamshi ,

What type of field are you writing back to - If a Choice field try

ForAll(
   DataCardValue3.SelectedItems,
   {Value:ApplicationName}
)

 

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.

Visit my blog Practical Power Apps

Hi @WarrenBelz , 

 

I am writing back to choice field, I tried with what you suggested but still won't work. 

Do you think it is something to do with DefaultSelectedItems = Parent.Default And Default is blank. 

 

Thanks for your help! 

 

@godala_vamshi ,

Try the DefaultSelectedItems

{ApplicationName:ThisItem.YourChoiceFieldName}

 

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.

Visit my blog Practical Power Apps

@WarrenBelz Now the data is saving in SP list but combo box values still clears. I noticed there is duplicate choice field with same name, I see values are saving in that duplicate field instead of one I placed on form.

 

Thank you 

Hi @godala_vamshi ,

What do you mean by duplicate Choice Field? Also if you are writing to a Choice Field allowing multiple choices, your Update probably should be 

ForAll(
   DataCardValue3.SelectedItems,
   {Value:ApplicationName}
)

 

@WarrenBelz So I created Choice field "AppInterfaces" on SP list and added to form, then I went to add new field and I found same field again and added to form. what I noticed is when I select values in 1st Choice field and save, values are moving to 2nd Choice field and 1st Choice field values are clearing out.

Yes, update is set as below. 

 

ForAll(
DataCardValue3.SelectedItems,
{Value:ApplicationName}
)

godala_vamshi_1-1637179719524.png

godala_vamshi_2-1637179736695.png

Thank you!

Hi @godala_vamshi ,

Get rid of the one that is not working - will that solve the issue?

godala_vamshi
Helper III
Helper III

@WarrenBelz It is duplicate on App it self(all I can do is remove from form), not on SP list, so there is no way to delete 2nd one. also I am trying to make at least one working but unfortunately same issue(values clearing after refreshing the form) when I set Update and DefaultSelectedItems property as you mentioned. 

 

Thank you

Hi @godala_vamshi ,

I am having trouble visualising your issue - you said you added the same field twice to your app - you just need to delete the one that is not working. Are you saying you have two fields in your list with the same name?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,750)