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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using selection from C...
Power Apps
Answered

Using selection from Combobox to update other comboboxes

(1) ShareShare
ReportReport
Posted on by 21

Hi,

 

I am developing a few tools, one of which is data entry from surveys (equipment, site name etc.) which takes the input data and adds this to a new line in an excel table, data_Surveys. I have another tool which can output from a second excel table, equipData, which I have included as a datasource within the app. The allowable 'equipment' in the data entry tool includes all the equipment listed in equipData for consistency.

 

I'd like to be able to, in my output tool, have a combo box to select one of the lines from the data entry table, data_Surveys, which then fills in the relevant information in my output tool. I have had a good go at this, but keep getting stuck when it comes to updating the series of combo boxes. See below a screenshot of the output tool form:

workatom_0-1720784684461.png

 

The 'populate from survey' combo box correctly updates the site textbox and the date, but I can't seem to get the Loc1-5 or PM combo boxes to update with data from the selected site. For example, in the Default property for the Site textbox, I have the following expression:

"If(IsEmpty(ComboBox1.SelectedItems),"",Concat(ComboBox1.SelectedItems,Site))"

 

This correctly updates the Site textbox.

 

How do I update the comboboxes to the same effect?

The column in data_Surveys that I want to extract data from for the Loc 1 combobox is 'Loc1_Meter', whereas in equipData, the column with the same information type is 'SLR_ID'. Please help!

Categories:
I have the same question (0)
  • madlad Profile Picture
    2,637 Moderator on at

    Hi!

     

    I hope I'm understanding correctly - Combobox1 gets a row from data_surveys, and you want to populate the comboboxes with the fields selected here? Or do you want to use it to get fields from equipData? Let me know if I'm misunderstanding!

     

    As long as the data source matches correctly, it should be similar - just make sure for comboboxes, that you use the "DefaultSelectedItems" property.

     

    For loc 1, you could do something like:

     

    If(
     !IsEmpty(ComboBox1.SelectedItems),
     ComboBox1.SelectedItems.'Loc1_Meter'
    )

     

     ^You may need to play with this a bit, but this should be the gist of it. 

     

    If you need to get data from one table based on the other, look into using the LookUp or Filter Functions

     

    Hope this helps! 🙂

  • workatom Profile Picture
    21 on at

    @madlad, thanks for your quick reply.

     

    You've understood correctly. Is there a technical difference between the two options you listed?

    I put your code in where you have suggested, and this is the first time I've seen no error (!) but when I test it out and change the survey combobox, only the Site and Date update. Nothing happens with Loc 1. Is there something else that I need to do?

     

  • madlad Profile Picture
    2,637 Moderator on at

    @workatom 

    This depends a bit more on specifics, most likely a reference isn't correct/doesn't match the expected data type.

    It depends on exactly what you're getting in Combobox1, and what the items property of both comboboxes is. 

    Any chance you could share a bit more about that?

     

    You can also view exactly what you have selected in the combobox by selecting "ComboBox1.SelectedItems" in your editor, similar to the image below from my editor:

    madlad_0-1720794158873.png

     

    Let me know! 

  • workatom Profile Picture
    21 on at

    @madlad this makes sense, but the data that I care about that is shared between the two tables is quite simple:

    This is ComboBox1 (sorry, the data table is 'Surveys', not 'data_Surveys' as I first typed it out:

    workatom_1-1720795132374.png

     

    and one of the ComboBoxes I want to update (loc 1):

    workatom_2-1720795196003.png

    In the SLR_ID column in EquipData, 'C3' exists in both datasets. So when I choose 'Test Site', which contains 'C3' under Loc1_Meter, I'd expect that to be able to update the Loc 1 ComboBox. Perhaps I need to use a lookup instead?

     

  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    @workatom 

    Yep, exactly!

    Because the data sources don't quite match exactly, I believe a LookUp is your best bet here. You could try something like:

     

    LookUp(
     EquipData,
     SLR_ID = First(Combobox1.SelectedItems).Loc1Meter
    )

     

    if the comboboxes are single-select, or:

     

    ForAll(
     Combobox1.SelectedItems,
     LookUp(
     EquipData,
     SLR_ID = ThisRecord.Loc1Meter
     )
    )

     

    if it's multiselect

     

    ^Please note I haven't tested these, so they might need some slight modification, but the general idea should be correct

  • workatom Profile Picture
    21 on at

     amazing, thanks for that. That worked as planned, albeit I had to format the code as follows, as they are all only single select:

    LookUp(
     EquipData,
     SLR_ID = First(ComboBox1.SelectedItems).Loc1_Meter
    )

    Thanks again!

    @madlad

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard