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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add new item dynamical...
Power Apps
Answered

Add new item dynamically in Combo box

(3) ShareShare
ReportReport
Posted on by Microsoft Employee

I want the user be able to enter a free form text in Combobox and if it is not in the list, add as a new item. For example, item 16 does not exist so this Search box will be acting as a New input box as well. Let's say if I hit enter or trigger via another button, it should add the new Item 16:

 

Screen Shot 2020-04-18 at 11.23.59 PM.png

Is there a way to do this or some workaround?

The only thing I can think of is to add a Textbox overlay on top of the Search box and "mirror" everything down in Search box. But if result=0, then add into the list.

 

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    It seem this functionality is not current available. You can add your voice to this already demanded Idea:
    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Dropdown-control-allow-end-user-to-add-a-choice/idi-p/141318

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Verified answer
    v-yutliu-msft Profile Picture
    on at

    Hi @Hoc ,

    Do you want to add a new item if there's no matching text with the text you enter in this combo box?

    If so, you could use ComboBox1.SearchText to represent the text entering in the combo box and use this to compare with the items in the combo box.

    I've made a similar test for your reference:

    1)set the combo box's Items:

    list1
    //my data source name, please replace with yours

    2)set the combo box's OnSelect:

    Set(var,ComboBox2.SearchText);
    If(IsEmpty(Filter(list1,field1=var)),Patch(list1,Defaults(list1),{field1:var}))

    Then if the text in the combo box has no matching text, it will create a new item with this value automatically.

     

    Please notice that the combo box's OnSelect will not act when you are entering text in the combo box.

    You need to firstly enter data in the combo box, then click the blank space, then click the combo box again, the onselect property will be triggered.

    Like this:

    420.gif

     

     

    Best regards,

  • Ziko Profile Picture
    10 on at

    It works,
    just IsEmpty is not enough, you need to also include && !IsBlank(var)

  • PauloRech Profile Picture
    105 on at

    I'm not sure whether it will work or not, cause in the OnSelect event, the SearchText is not typed yet.

    Do you guys have a work around on this issue?

  • Ricardo_Costa Profile Picture
    150 on at

    I had the same issue and I solved it like this.

     

    Datasource: SharePointList

     

    In the combobox items property I put: Distinct(SharePointList,ColumnA).Result

     

    In a save button OnSelect property I put this: Patch(SharePointList, Defaults(SharePointList),{ColumnA: If(IsBlank(combobox .Selected.Result), combobox .SearchText,combobox .Selected.Result))

     

    With this, when you type a new item in the combobox, it'll inserted in the SP List and will be available next time in the combobox within one click

  • Community Power Platform Member Profile Picture
    on at

    I don't understand why do we need a second combobox?

  • powerapp2020 Profile Picture
    4 on at

    This solution has stopped working. 

     

    Now when you click on the blank space, it will no longer append to the collection now. 

  • Powerplatform01 Profile Picture
    386 on at

    You can watch this video to resolve your issue

    https://youtu.be/FQLYt0CsWZQ

  • mnunesbo Profile Picture
    14 on at

    The video seems to be privated

  • Josie30 Profile Picture
    4 on at

    How this it work with DataVerse? I tried it and it doesnt give an error, but the information is not saved in the DataVerse columns. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard