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 / How to Filter a Combo ...
Power Apps
Unanswered

How to Filter a Combo Box Control based on another Combo Box control

(0) ShareShare
ReportReport
Posted on by 13

Hello Everyone,

I have 3 SharePoint list. 

  • The first list (Teams) contain simply the name of the Teams. (Title column is named to "Teams")
  • The Second (Project Tasks) contain two columns: The first column is a Lookup Column that is getting values from the first SharePoint list "Teams/Title" column and the second column contain the Projects that each team is managing .
  • The 3rd SharePoint list (Requests) is for raising request to the appropriate teams and selecting a project. Columns:
    Request Title (Text column)
    Team (Lookup column based on the first SharePoint list)
    Project (Lookup column based on 2nd SharePoint list Projects column)

I added all the three SharePoint list as Datasource in the Canvas Power app and added a Edit form control for which the data source is the 3rd SharePoint list.

Now i want the user to have the capability to select a Team from the Team Dropdown and based on the Team the Project Dropdown should get filtered to show the projects for that team only.

 

The issue that i am facing is when i am changing the Items property of the Project Dropdown to :

Choices('Project Tasks'.Tasks) I am getting error //Name isn't valid. {'0'} isn't recognized
 
Please tell me how can i achieve this because both columns "Project" and "Team" present in Request List is lookup column that have Id and Value associated with it.

 

Categories:
I have the same question (0)
  • Prabhakar_S Profile Picture
    735 Moderator on at

    Hi @baldeep_1993 ,

     

    To achieve the desired functionality of filtering the Project ComboBox based on the selection in the Team ComboBox, you need to properly configure the Items property of the Project ComboBox to filter the projects based on the selected team. Given that both columns "Project" and "Team" in the Request list are lookup columns, you need to filter the projects using the lookup column values correctly.


    Assuming that the ComboBox control for selecting the team as 'cmbTeams' and another ComboBox control for selecting the project as 'cmbProjects'.

     

    Items property for 'cmbTeams':
    - Set the Items property of 'cmbTeams' to `Teams`. This will display the list of teams.
    - Set the DisplayFields property to display the team names.

    Items property for 'cmbProjects':
    - Use the Lookup field of the selected team to filter the projects in the second ComboBox. 

    Filter('Project Tasks', 'Team/Title' = cmbTeams.Selected.Teams).Projects

    - Set the DisplayFields property to display the project names.

     

    Bind the Combo Boxes to the Edit Form control:
    - For the 'Team' DataCard, replace the default dropdown with the 'cmbTeams' ComboBox.
    - For the 'Project' DataCard, replace the default dropdown with the 'cmbProjects' ComboBox.

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

  • baldeep_1993 Profile Picture
    13 on at

    It is not working. I did what you wrote and the cmbteams combo box is able to filter the cmbprojects combo box but when i am saving the form the values are not getting stored in the SharePoint list because, if you remember for both DataCards that contain Combo box control the Update property is:

    DataCardValue25.Selected
    DataCardValue24.Selected
    and since they are lookup columns the value that SharePoint require must be in the form of 
    {Value : _________________, Id: _______________}

    and since changing the items property of both the controls is not passing the values in this format instead the Values are going to data source as {Value: _________ }, there is no Id associated with it.
     
    Hope you understand my point.
  • Prabhakar_S Profile Picture
    735 Moderator on at

    I understand the issue. I have given some articles and references below that suits your needs,

     

    Cascading dropdown in a Form - How to create Cascading (Dependent) Dropdowns in Power Apps - YouTube

    SharePoint Lookup Column in PowerApps - PowerApps Cascading Combobox from SharePoint list with lookup field/column type - YouTube

    Cascading Combobox from SharePoint list with lookup field/column type - PowerApps Cascading Combobox from SharePoint list with lookup field/column type - YouTube

     

    Articles : 

    Power Apps: filtering a SharePoint list on a multiple values lookup column using a multiple selections Combo Box or Drop Down – SharePoint me in the right direction (mikedemster.com)

     

    Filtering lookup values based on another column in another list, sharepoint online and powerapps - SharePoint Stack Exchange

     

    Please refer to these articles & videos and adjust your formula to Filter the Project based on your Lookup Field/Column type in the SharePoint List.

     

    Hope this Helps!!!

     

    Thanks!!!

     

    Please consider marking my response as the accepted solution if it successfully resolves your concern. If you found the information beneficial in other aspects, kindly express your appreciation by giving it a thumbs-up.

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