cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
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
WarrenBelz
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (70,713)