cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Resolver II
Resolver II

How to capture the non selected field of a ComboBox?

Hey guys,

Been trying it a long time to discover how to get the non selected value (search field) of the ComboBox.

How to achieve to get it?

 

The ComboBox is enabled for searching but disabled for multiple selection.

If I press a button I don't like to trigger the event (onSelect) whether I haven't selected an item from the ComboBox yet.

If the ComboBox just shows the searching field, the button should not be triggered.

 

As you can see below, there's UserPrincipleName selected but how to get the value of the non selected ComboBox?

 

ComboBox1.Selected.UserPrincipalName

 

 

Appreciate your support! Thanks so much!

1 ACCEPTED SOLUTION

Accepted Solutions
Resolver II
Resolver II

Hey guys,

Very simple. Here's the solution:

 

If(IsBlank(ComboBox1.Selected), DisplayMode.Disabled)

 

@mdevaney

ComboBox1.SearchText

It's ComboBox1.Selected.

 

I just wanted to catch whether there's a record or not in the ComboBox. If I enable searching, the ComboBox will tell me that there's no record at the initial configuration. If I select an item, then ComboBox1.Selected will tell me there is. This is what I need.

 

Thanks so much and have a nice day!

View solution in original post

3 REPLIES 3
Super User III
Super User III

@ThePowerAppsGuy 

You can obtain the text from the Search field like this:

ComboBox1.SearchText

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Resolver II
Resolver II

Hey guys,

Very simple. Here's the solution:

 

If(IsBlank(ComboBox1.Selected), DisplayMode.Disabled)

 

@mdevaney

ComboBox1.SearchText

It's ComboBox1.Selected.

 

I just wanted to catch whether there's a record or not in the ComboBox. If I enable searching, the ComboBox will tell me that there's no record at the initial configuration. If I select an item, then ComboBox1.Selected will tell me there is. This is what I need.

 

Thanks so much and have a nice day!

View solution in original post

@ThePowerAppsGuy 
Glad you were able to find a solution.  Best of luck building your app.

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 (12,579)