web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create new record from...
Power Apps
Unanswered

Create new record from Canvas App

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

 

I have a requirement wherein I have to show all contacts to the user for which I have used a combo box and if a record doesn't exist then I should give the user the ability to create new record and the newly created record should be automatically selected in the combo box.

 

For this I have created a "New" button from which I am calling quick create form that solution does provide user the ability to create new record but this newly created record is not getting automatically populated in the combo box.Canvas app.PNG

 

Could anyone please provide me solution for above problem wherein I can give user the option to create new record and the newly created record should be automatically populated in the combo box.

 

Thanks in advance for help.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Debz 

    As long as the data source for your combobox is the data source for the form, it should be automatically added.  If you add Refresh(datasource) to the On Success property of the form, it should guarantee that it will be added. If you are using a collection as the data source of the combobox, you will need to use ClearCollect() in the OnSuccess property of the form to recreate the collection with the new item so that it shows in the combobox. 
    Another approach that does not change the order of the data source in the combobox but simply shows the new item would be to create a variable as follows and use it in the DefaultSelectedItems property of the combobox as shown in the screenshot below.  The data source is a SharePoint list called FakeNames, a sample list of contacts. The variable is picklast.  The use of First(Sort(datasource,ID,Descending)) ensures that the last entry is selected even if the list is > 2000 items. _Screenshot 2020-12-02 073243.png

  • Divyamahajan Profile Picture
    8 on at

    @Drrickryp 

     

    Thanks for your response.

    However I want to allow the user to first create a new contact and then populate the newly created record in the combobox but if I set the DefaultSelectedItems property of the combobox as First(Sort(datasource,ID,Descending)) it will not wait for the user to create new record it will automatically select the last created record.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard