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 / ComboBox with 2 ShareP...
Power Apps
Answered

ComboBox with 2 SharePoint List connection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello guys,

 

I need your help.

 

I have 2 Sharepoint List:

Approvals A and Approvals B

Both lists have the same column structure

Approvals A with columns Department X, Department Y, Department Z

Approvals B with columns Department X, Department Y, Department Z

 

In Powerapps I have a combobox which you can select Approvals A or B

And 3 other combobox for every Department:

Derpatment X - combobox, Department Y - combobox - Department Z - combobox

 

Now the problem is I`m not able to dynamically change the data for Department Y - combobox based on the ComboBox where user can select Approvals A or B.

The formula I put in for Items is: Switch(DataCardValue5.Selected.Value,"A",'Approvals A'.Department Y,"B",'Approvals B'.Department Y)

If I manually put one connection is working fine, but with formula is not.

 

Strangely it is working for Department X, I think because the name of the column was Title and I changed it

 

Thank you,

Alex

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @Anonymous ,

    Dynamically setting the Items of a drop-down control are problematic at best, however you could do a Collection on the OnChange of your drop-down

    ClearCollect(
     colDD,
     Switch(
     Self.Selected.Value,
     "A",'Approvals A'.Department Y,
     "B",'Approvals B'.Department Y
     )
    )

    Then the Items of the other control would be colDD (or whatever you wanted to call it).

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @WarrenBelz 

     

    Thank you for your response.

    I tried your solution and it`s working just for Approvals A. I think because this was first selected and some automatically fields were completed for the combobox.

    Even if I refresh the application and select first the Approvals B, it will not work, it shows blank fields.

    I had the same problem also when I tried with formula in Items property.

     

    Best regards,

    Alex

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I managed to get it done by adding a table and collect data from both sharepoint lists in it.

    In both sharepoint lists I created one more column: ApprovalsColumn, filled with "A" and "B" for the second one, this will help to filter the data.

     

    I put on application OnStart, this will populate table with data when the application starts.

    ClearCollect(
     colDD,
     'Approvals A'
    );
    Clear(
     ForAll(
     'Approvals B',
     Collect(
     colDD,
     {
     'Department X': 'Department X',
     'Department Y': 'Department Y',
    		'Department Z': 'Department Z',
     'ApprovalsColumn': 'ApprovalsColumn'
     }
     )
     )
    )

     

    And for the comboBox Item:  

    Filter(colDD,ApprovalsColumn=Switch(DataCardValue5.Selected.Value,"A",'Approvals A'.Department Y,"B",'Approvals B'.Department Y))
    

     

    Thank you @WarrenBelz, your response gave me the idea.

     

    Best regards,

    Alex

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard