cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
mdevaney
Super User III
Super User III

@Anonymous 

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."

Anonymous
Not applicable

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

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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,525)