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 / Cascading multi-select...
Power Apps
Unanswered

Cascading multi-select combo boxes - how to preserve valid selections when parent combo box changes

(2) ShareShare
ReportReport
Posted on by 104
I have a series of multi-select cascading combo boxes working as desired to populate a SharePoint list.  Only thing I want to change is when the parent combo box is changed it currently completely clears the child combo box, I would like the child combobox to maintain the valid selections.  What I mean by this is if in the parent "Direct" and "Indirect" are selected, then in the child "Alpha" and "Bravo" selected (linked to Direct) and "Charlie" and "Delta" (linked to Indirect) are also selected.  If I go back to the parent combo and deselect "Indirect", I want "Alpha" and "Bravo" to remain.
 
Parent combo box: "comboType" is linked to choices field in Sharepoint list and items property is this;
Choices('Category Options'.'Direct/Indirect')
 
Child combo box: "comboCat" is linked to lookup column in Sharepoint list and items property is this;
Filter('Category Options', 'Direct/Indirect'.Value in comboType.SelectedItems.Value)
 
I have tried setting a variable in the OnChange of the parent and calling it within the DefaultSelectedItems of the child, any variation of this still completely clears the child.
 
Parent OnChange
Set(prevSelection, comboCat.Selected)
 
 
Child DefaultSelectedItems
If(!IsBlank(prevSelection), Filter(prevSelection, Value in Filter('Category Options', 'Direct/Indirect'.Value in comboType.SelectedItems.Value).Value), [])
 
 
Appreciate any help offered
 
 
Categories:
I have the same question (0)
  • Verified answer
    tatmaninov Profile Picture
    104 on at
    Managed to solve my own query through trial and error, I share the solution here for anyone interested;
     
    Parent combobox;
     
    OnChange
    ClearCollect(prevCat,Filter(prevCat, 'Direct/Indirect'.Value in comboType.SelectedItems.Value))
     
     
    Child combobox;
     
    OnChange
    ClearCollect(prevCat,Self.SelectedItems)
     
    DefaultSelectedItems
    prevCat

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard