cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
burliad
Helper III
Helper III

Update DataCardValue based on Combo Box

Hi All,

 

I have an Edit Form that allows users to update inventory from a SharePoint List.  One of the fields (DataCardValue14) holds an ID (loc_id).  I would like to have a Combo Box that displays a list of locations and updates DataCardValue14 to the proper loc_id.  I need some help with the ComboBox OnChange.  Also open to other ideas if I am proceeding with this incorrectly.  Thanks

 

DataCardValue14 Default:  (displays data selected from detail screen)

Parent.Default

 

ComboBox1 Items:

tbl_locations.location

 

ComboBox1 DefaultSelectedItems: 

LookUp(tbl_locations, loc_id = BrowseGallery1.Selected.loc_id)

 

ComboBox1 OnChange: 

UpdateContext({DataCardValue14:LookUp(tbl_locations, location = ComboBox1.SelectedItems, loc_id)})

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

Use this formula on default of the textbox:

LookUp(tbl_locations, location = Combobox1.Selected.location,loc_id)

 

That you want to see loc_id in the textbox.

 

Dont use the OnChange

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
eka24
Super User
Super User

Use this formula on default of the textbox:

LookUp(tbl_locations, location = Combobox1.Selected.location,loc_id)

 

That you want to see loc_id in the textbox.

 

Dont use the OnChange

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Thank you!  Never thought to change the default on the textbox now that the combobox pulls default data from the detail screen.  Thanks again!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,472)