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

ComboBox with 2 SharePoint List connection

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,079 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
    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
    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

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard