cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
caballar
Level: Powered On

Lookup A Value Based on a ComboBox Selection

Hi,

 

I have two tables: dbo.Semesters and dbo.Courses.

 

I have an edit form connected to the dbo.Courses data.

 

I have a ComboBox in that edit form to select the correct semester title, and the Items property of that ComboBox connects to dbo.Semesters.

 

What I want to do is select the title of the semster ("Spring 2018") and have that data displayed in the ComboBox, while at the same time populating another text field named Semester ID with the ID from the dbo.Semesters table. The ComboBox is working properly. I just need the text field to autopopulate with the correct ID from the dbo.Semesters table, based on the selection from the ComboBox semester title. I'm thinking I need to have the text field do a Lookup based on the ComboBox selection.

 

How can I accomplish this?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
caballar
Level: Powered On

Re: Lookup A Value Based on a ComboBox Selection

The solution was to use a contextual variable. On the ComboBox, I set the OnChange and OnSelect property to UpdateContext({IDVAR: ComboBox2.Selected.AutoID}).

 

Then on the textbox where I want the ID to show up, I set its Default property to IDVAR.

 

 

View solution in original post

1 REPLY 1
caballar
Level: Powered On

Re: Lookup A Value Based on a ComboBox Selection

The solution was to use a contextual variable. On the ComboBox, I set the OnChange and OnSelect property to UpdateContext({IDVAR: ComboBox2.Selected.AutoID}).

 

Then on the textbox where I want the ID to show up, I set its Default property to IDVAR.

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,131)