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

Default Combo Box Value based on another Combo Box

Here is what I am trying to accomplish.  I want the selection of a Combo box (JobCombo) to be used to prepopulate another combo box for a form in new mode.  This form is going to be used for a large amount of data entry, and I don't want to have to reselect this value that will remain the same many times in a row.  

 

In the screenshot below, I have a combo box JobCombo that contains values of JobTitle from JobTable (Sharepoint List).   Below I have a form, with a default mode of "new" and DataSource = JobTrainings (Sharepoint List).  The 'Job Title' combo box in this form is a lookup of JobTitle in JobTable.  Instead of seeing all options in this combo box, I want it to default to the value selected in JobCombo, above.

 

I am almost literally pulling my hair out trying to get this figured out.  I have been reading about changing the DefaultSelectedValues of the combo box, but I'm just not getting it right.  

 

I would really appreciate the help.  Newbie, but working very hard to learn.

 

mrlang02_0-1598487387935.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for the suggestions everyone.  I am probably redesigning this whole app page anyway, but here is how I had to solve my problem.  

 

JobCombo Items property changed to Choices([@TrainingPlan].'Job Title')

 

JobCombo2 Items property = Choices([@TrainingPlan].'Job Title')

 

JobCombo2  DefaultSelectedItems property=JobCombo.Selected

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @mrlang02 ,

What is the name and Items of your first combo box, the name of the List and the field name you want to see in the second one?

PowerAddict
Super User II
Super User II

Have you tried the following? 

[JobCombo.Selected.Value]

 or

JobCombo.SelectedItems

 

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

I tried setting the DefaultSelectedItems property of the second combo box to both your suggestions and received this error.  

 

mrlang02_0-1598561350720.png

 

I hope the attached illustration helps explain.  I want to see the selected value in "JobCombo" be prepopulated in "JobCombo2"

Thank you

mrlang02_0-1598562674000.png

 

The expressions seem correct and based on the error messages you shared, it seems like the control names in your appmight be different from the ones I have used in my expressions. 

 

Can you give me the exact names of the controls you have selected in your image? And the control types as well - combo box, drop down etc

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

 

Thanks!
Hardit Bhatia
Microsoft Business Applications MVP
https://thepoweraddict.com

Thanks for the suggestions everyone.  I am probably redesigning this whole app page anyway, but here is how I had to solve my problem.  

 

JobCombo Items property changed to Choices([@TrainingPlan].'Job Title')

 

JobCombo2 Items property = Choices([@TrainingPlan].'Job Title')

 

JobCombo2  DefaultSelectedItems property=JobCombo.Selected

View solution in original post

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (59,475)