web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating combo box b...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 15
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.
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!
  • PowerAppsHelpMe Profile Picture
    15 on at
    What does “Coll” mean? Does this code only go into the items property of the combo box?
  • PowerAppsHelpMe Profile Picture
    15 on at
    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.
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!
  • PowerAppsHelpMe Profile Picture
    15 on at
    Thank you for helping me out. I am having issues with matching fields. Is there a way to get the data from the DefaultSelectedItems?
  • PowerAppsHelpMe Profile Picture
    15 on at
    DefaultSelectedItems is working, but I would want to switch the matching field when the combo box is clicked on.
  • PowerAppsHelpMe Profile Picture
    15 on at
    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.
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard