cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,889)