cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Community Champion
Community Champion

Reference current value of Combobox?

Scenario:

- Form:

  - DataSource: Sharepoint

  - Mode: Edit

- Form Field:

  - Type: Combobox

  - Items: Filter(colLocations, region = ddRegion.Selected.Result)

  - DefaultSelectedItems: [Parent.Default] (<--cool hack by the way; putting brackets around Parent.Default)

 

When the form is in Edit Mode, I can't seem to find an external way to reference the value shown in the Combobox. The only way I can access the value in the Combobox is to use First([Parent.Default].Value).Value. But of course, I can't access this value outside the Form Field due to "Parent". 

 

How the heck do I access the value shown in the Combobox?

 

Tried: combobox.Selected.location; combobox.SelectedItems.location, etc. 

 

I feel like the above options used to work in PowerApps, but no longer. 

Any ideas? 

 

Thank you

3 REPLIES 3
Super User III
Super User III

Hi @ericonline ,

Assuming this is a single selection combo box, would ComboBox.selected.region do the job?
Interesting hack on DefaultSelectedItems.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi Warren,

 

When the form is in Edit mode, this does not work. Presumably because the user has not SELECTED an option but rather PowerApps is DISPLAYING the value from an existing record. 

The workflow:

- User clicks “View Records”

- Gallery screen displays a collection of recent records

- User selects a record

- A ViewForm is shown of that record

- User clicks Edit icon

- EditForm is shown of that record


There is no way to reference the current value shown in the Combobox (the Parent.Default value). 

Hi @ericonline ,

I have never used the [Parent.Default] hack, so use the syntax in my last post.

For the DefaultSelectedItems, I just use 

{region:ThisItem.region}

as this displays the value in the selection and can be used "externally".

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (36,963)