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

Combo Box Previous Selections cleared on Save

Hi,

 

I have choice column "Document Type" with multiple selections allowed.  In my Power Apps form I have this field configured as a combobox with cascading options.  The multiple selection and initial save works fine.  If a user edits the item again, the previous selections appear by default, but on Save the column gets cleared.  Right now we are manually instructing people to deselect and reselect all combobox fields even if they are editing a different field.

 

Datacard config:

Default = ForAll(ThisItem.'Document Type',{Value:Value})

Update = ForAll(
DocTypeCombo.SelectedItems,
{Value:Type1}
)

 

Combobox config:

DefaultSelected Itemd = Parent.Default

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi@TrueBlue008,

Based on the issue that you mentioned, do you want to keep the previously submitted ComboBox selected on saving?

Could you please share a bit more about your scenario, how you configure your form?

If you want to edit a record, I advise you to add a Gallery where click the record you want to edit and navigate to the EditForm. 

I have a test on my side, please take a try as below.

Add a Gallery and set the Items property as below:

 

SortByColumns(Filter([@'0911'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Add a “+” Button and set the OnSelect property as below:

 

NewForm(EditForm2);Navigate(Screen1, ScreenTransition.None)

 

Set the Item property of the EditForm2 as below:

 

BrowseGallery1.Selected

 

Set the DefaultSelectedItems property of the ComboBox as below:

 

ThisItem.'Document Type'

 

Set the Update property of the data card corresponding to the 'Document Type' as below:

 

DataCardValue9.SelectedItems

 

Set the Default property of the data card corresponding to the 'Document Type' as below:

 

ThisItem.'Document Type'

 

Note: DataCardValue9 represents the ComboBox.

Please check if the above settings could solve your problem.

In addition, there is another possibility that whether you have put the ResetForm() function within your submit button?

If not, please try to set the submit button OnSelect property as below:

SubmitForm(Form1);ResetForm(Form1)

Of course, if you want to edit the form at the same time when you open the form, you could set the navigate button OnSelect property as below:

Navigate(EditScreen1);ResetForm(Form1)

Best Regards,

Qi

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi@TrueBlue008,

Based on the issue that you mentioned, do you want to keep the previously submitted ComboBox selected on saving?

Could you please share a bit more about your scenario, how you configure your form?

If you want to edit a record, I advise you to add a Gallery where click the record you want to edit and navigate to the EditForm. 

I have a test on my side, please take a try as below.

Add a Gallery and set the Items property as below:

 

SortByColumns(Filter([@'0911'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Add a “+” Button and set the OnSelect property as below:

 

NewForm(EditForm2);Navigate(Screen1, ScreenTransition.None)

 

Set the Item property of the EditForm2 as below:

 

BrowseGallery1.Selected

 

Set the DefaultSelectedItems property of the ComboBox as below:

 

ThisItem.'Document Type'

 

Set the Update property of the data card corresponding to the 'Document Type' as below:

 

DataCardValue9.SelectedItems

 

Set the Default property of the data card corresponding to the 'Document Type' as below:

 

ThisItem.'Document Type'

 

Note: DataCardValue9 represents the ComboBox.

Please check if the above settings could solve your problem.

In addition, there is another possibility that whether you have put the ResetForm() function within your submit button?

If not, please try to set the submit button OnSelect property as below:

SubmitForm(Form1);ResetForm(Form1)

Of course, if you want to edit the form at the same time when you open the form, you could set the navigate button OnSelect property as below:

Navigate(EditScreen1);ResetForm(Form1)

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,930)