Showing results for 
Search instead for 
Did you mean: 
Post Patron
Post Patron

combobox : default to last saved record


How do I keep the last saved selected item visible in the combo searchbox after saving the item? (How to avoid losing the last data entry by accidently saving an empty combobox )!



Accepted Solutions


I was able to replicate the issue

View solution in original post

Impactful Individual
Impactful Individual

Assuming that your form is in New mode. use YourForm.LastSubmit.Value on the OnSuccess of your form and store the value in a variable, like Set(glbComboValue,YourForm.LastSubmit.Value). then set the Default property of your combobox to this variable

Community Support
Community Support

Hi @Englishweb ,


If the purpose of this requirement is to avoid empty saving for the combo box field, then you could achieve this by set below formula in the submit button:


Then set below formula in the Default property of combox box data card:




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

Hello @v-monli-msft @Edwin-Abdalian 

The Combobox is in a Gallery, not a form, could you tell me the settings for this please?

And thanks again for all your help!

Here is a visual of the Gallery and corresponding datatable (and the problematic combobox)!

The Textlabels are working perfectly, as is the patch to the datatable. The Combobox reverts to another surname, not the last saved one, which is confusing. 

I am trying to get the combobox default to be the same as the text label....


on the Select of your button, get the Last record that was created in your list.

Refresh('Master Test');
Set(varLastRecord,Last('Master Test'));


Then set the Default property of your combobox to varLastRecord.myChoice.Value

**Please replace the names with your controls and columns names


I've updated the OnSelect: Refresh(SUMMARYDATATABLE);Set(varLastRecord,Last(SUMMARYDATATABLE));


For the Default properties on the combo box I tried  varLastRecord.Student1.Value

but .Value gives an error

Any ideas??


Could you use Alt+Button to populate the variable with a value first. it might help.

I don't see an error on my side and it's happy with the Value. but I remember having issues with the Last() function and at some point I considered using the First() function but sort it descending




Thank you for your continued patience.

I think there is maybe a confusion, I probably am not explaining myself clearly.  I want the combobox to show the same name as in the data table entry, not the last record in the table. Is this possible? I've been trying to resolve this for days!


Could you please tell me the sequence of the actions that users take to complete that form.

1- User enters the First Name, Surname (it's a textInput control)

2- user enters dates (debut, fin)

3- What does the user do with the comboBox? what is behind the combobox? is it a choice field? a Person or a lookup?

4- user presses Submit (you use Patch() function to create a new record

5- users sees the record that was created in a data able

6- Data table shows the name

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,359)