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 / Help with Patching Com...
Power Apps
Answered

Help with Patching Combobox Searchtext in Gallery

(0) ShareShare
ReportReport
Posted on by

Hi!

I am looking for help Patching a combobox's search text when the combobox.selected."name" is blank. 

 

I have a gallery that contains 10 rows of data and includes comboboxs to log who is working on an item. The goal is that everytime there is an onchange, the selected value is passed to a collection. That part I have covered, but I want the user to be able to type in the search text and if it does not match with an item, then save the searchtext to the collection. The issue here is that there is no onchange triggered when a user leaves the combobox without selecting an item (although the search text remains visible to the user). All of my data is saved via a button that patches the collection to the data source. 

 

Examples:

1) My combobox:

SuperRomes_0-1697574660022.png

2) My combobox after typing something into the search text and unselecting the box (data is not saved to collection):

SuperRomes_1-1697574742306.png

Any idea on how to save this searchtext?

 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @SuperRomes ,

     

    I assume there is a collection:

    ClearCollect(DataSrouce,{ColumnName:{Value:"1"}});

    and the combo box' items property is

    ["A","B","C"]

    Please try something like:

    If(
     !IsBlank(ComboBox1.SearchText) && IsBlank(ComboBox1.Selected),
     Patch(DataSrouce,Defaults(DataSrouce),{ColumnName:{Value:ComboBox1.SearchText}}),
     Patch(DataSrouce,Defaults(DataSrouce),{ColumnName:ComboBox1.Selected})
    )

     

    Best Regards,

    Bof

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard