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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,434)