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

Populating combo box based on drop down value selected and access the data

I want to populate a combo box from the selected data from another combo box or drop down. I want this to happen only when there is a value selected from a combo box, else display the current data (which has its own field). Combo box names:CB 1(the combo box that is selecting data) and CB 2 (the combo box to populate.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Populating combo box based on drop down value selected and access the data

Hi @PowerAppsHelpMe 

 

Yes thats correct, you need to select the attributes you want to use as Display and Search field. By default the editor selects one but if you want a different field to be displayed, this can be changed from the right menu item.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

8 REPLIES 8
Highlighted
Dual Super User III
Dual Super User III

Re: Populating combo box based on drop down value selected and access the data

Hi @PowerAppsHelpMe 

 

You can use the below expression on your Combobox 2 as:
 
If(IsBlank(ComboBox1.Selected),Filter(DataSource,Col1 = "Value1"),Filter(DataSource,Col1 = "Value2"))
 
This checks if the Combobox1 control selected value is blank and filter the results accordingly.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Frequent Visitor

Re: Populating combo box based on drop down value selected and access the data

What does “Coll” mean? Does this code only go into the items property of the combo box?
Highlighted
Frequent Visitor

Re: Populating combo box based on drop down value selected and access the data

My combo box is searching one column from a data source. The value selected represents finding the row that someone wants and the items on that rows are auto populate into combo box and label. I can display the data on that row using labels, but combo box are giving me problems. I do not want the whole row, want an item that is on the same row as the combo box 1 value selected. This is extra information.
Highlighted
Dual Super User III
Dual Super User III

Re: Populating combo box based on drop down value selected and access the data

Hi @PowerAppsHelpMe 

 

Coll1 is the name of column that I used in my expression, this needs to be replaced with the Column Name.
 
Since you have only 1 row that you are trying to fetch, you can set the OnChange property of your combobox as:
 
Set(SelectedRecord,Lookup(DataSource,Col1 = Combobox1.Selected.Value))
 
Here, we are initializing a variable (SelectedRecord) to get the record value based on selection in Combobox control. Here, we are filtering the record where Col1 value is equal to combobox selected value.
 
Now, the label's Text property can be modified to: SelectedRecord.Name -> This will fetch the name for the associated record. This can be changed based on the column value you are trying to fetch.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Frequent Visitor

Re: Populating combo box based on drop down value selected and access the data

Thank you for helping me out. I am having issues with matching fields. Is there a way to get the data from the DefaultSelectedItems?
Highlighted
Frequent Visitor

Re: Populating combo box based on drop down value selected and access the data

DefaultSelectedItems is working, but I would want to switch the matching field when the combo box is clicked on.
Highlighted
Frequent Visitor

Re: Populating combo box based on drop down value selected and access the data

Sorry about that I figure it out with the default. I need to find how to change fields of the combo box. So i can display different field at different occasions.
Highlighted
Dual Super User III
Dual Super User III

Re: Populating combo box based on drop down value selected and access the data

Hi @PowerAppsHelpMe 

 

Yes thats correct, you need to select the attributes you want to use as Display and Search field. By default the editor selects one but if you want a different field to be displayed, this can be changed from the right menu item.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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 (4,140)