cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Microsoft
Microsoft

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
Highlighted
Microsoft
Microsoft

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,121)