Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PBn0jBYkXJ0DDeE72d7Neh
Power Apps - Building Power Apps
Answered

Multiselect Combobox/Checkbox in 3 cascading levels

Like (0) ShareShare
ReportReport
Posted on 27 May 2021 01:37:06 by 90

I'm trying to setup a form where users can select multiple options from CB1 leading to cascading CB2 leading to CB3, all multiple select. Data needs to submit to a SP list, preferably 3 separate columns where users should be able to filter for each value. I'm open to ideas on how to setup the data, but in my scenario, CB3 has about 100 options in total, so I was thinking along the lines of a lookup column to another SP list - but I'm open to anything that is easier. 

 

Example:

 

Combobox1 dropdown (Primary Col)Combobox2 dropdown (Secondary Col)Combobox3 dropdown (Tertiary Col)
FruitsFreshApples
VeggiesFrozenBananas
  Blueberries
  Asparagus
  Eggplant
  Spinach

 

Mapping is as below:

FruitsFreshApples
FruitsFreshBananas
FruitsFrozenBlueberries
   
VegetablesFreshAsparagus
VegetablesFreshEggplant
VegetablesFrozenSpinach

 

User should be able to select Multiple options from Combobox1, Combobox2 or Combobox3.

Ex. of my selection:

Fruits->Fresh->Apples, Bananas

Vegetables ->Fresh->Asparagus, Eggplant

Vegetables->Frozen ->Spinach

 

Combobox1, 2 and 3 need to be prompted to select something and not leave it blank. 

 

@RezaDorrani @yashag2255 @Pstork1 @PowerAddict 

Categories:
  • Community Power Platform Member Profile Picture
    on 29 Sep 2023 at 02:41:34
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Hi, So what is Result in this?

    Clear(secondaryuser);Collect(secondarytest,Ungroup(ForAll(ComboBox1.SelectedItems,Filter(list12,Primary=Result).Secondary),"Value"))

     i get an error while using this  

  • karthika89 Profile Picture
    2 on 01 Oct 2021 at 12:09:12
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Can you please explain how the item property has to be updated in case we have duplicate values and has to be listed in the dropdown only once.Also what has to be written in the "Update Property"

    AddColumns(RenameColumns(thirdtest,"Title","Value"),"Id",LookUp(FruitDetails,Title=Value,ID))

  • Mikello-6626 Profile Picture
    90 on 15 Jun 2021 at 13:27:47
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Thank you so much, your solution works perfectly. 

  • Verified answer
    v-albai-msft Profile Picture
    on 15 Jun 2021 at 06:06:23
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Hi @Mikello-6626 ,

    You can think of Reset function, use this function on OnChange property of combo box based on your need. 

    For example, on DataCardValue2 control, after each change action, Reset DataCardValue3 control and DataCardValue4 control.

    v-albai-msft_1-1623736907991.png

    The only downside is that all selected options in the second and the third combo box will be clear, user need to select again). But this did work for avoiding users selecting wrong values.

    Best regards,

    Allen

     

  • Mikello-6626 Profile Picture
    90 on 14 Jun 2021 at 17:04:51
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    @v-albai-msft Hi Allen, thank you so much for getting back to me with this. I think this is working great, filtering and recording properly. The only issue I see is, when user is filling the form, if they select Fruit, Fruit type and if they delete one of the fruit choice, the associated fruit type does not get deleted and it gets submitted. In other words, while the new form is open, is it possible to dynamically eliminate FruitType_mul and FruitDetail_Mul selected choices based on Fruit if it gets changed before submitting the form - so that mismatched Fruit Type/Detail does not get submitted? Below is the problem:

     

    New form, first I select these as choices:

    Mikello-6626_0-1623690140862.png

     

    As user, before submitting I realize I make mistake in selecting fruit, so I change it to just Dairy:

    Mikello-6626_1-1623690232061.png

     

    As you can see in above, "Fresh Fruits" and "Apples" Bananas" still remain in form as valid selections. Even though if I click on dropdown, it s filtering properly. But user can make mistake and submit this form. But it will not match actual data mapping. Hope this is making sense. Any ideas to dynamically delete associated lookup values from selection and force user to submit with proper choices?

     

     

     

     

     

  • Verified answer
    v-albai-msft Profile Picture
    on 10 Jun 2021 at 07:52:24
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Hi @Mikello-6626 ,

    It is more clearly after you provide your data structure.

    Based on your current four lists, I did a test on my side for your reference.

    1. For the first combo box(called “DataCardValue2” in my form), use the default code for its Items property:

    Choices([@'Master list'].Fruit_Mul)

    v-albai-msft_0-1623311268744.png

     

    Set OnChange property of the first combo box to:

    Clear(secondarytest);Collect(secondarytest,Ungroup(ForAll(DataCardValue2.SelectedItems,Filter(FruitType,Fruit=Value).Title),"Value"))

    v-albai-msft_1-1623311268756.png

     

    Pay attention about the result format of the first combo box(because this is a lookup column in your list), the returned table has two columns: Id and Value. See below screenshot, so for other two combo box, we need to change their result to this format too, then you can save your choices into your list.

    v-albai-msft_2-1623311268760.png

     

    2. For the second combo box (called “DataCardValue3” on my side), set its Items property to:

    AddColumns(RenameColumns(secondarytest,"Title","Value"),"Id",LookUp(FruitType,Title=Value,ID))

    v-albai-msft_3-1623311268763.png

     

    Set its OnChange property to:

    Clear(thirdtest);Collect(thirdtest,Ungroup(ForAll(DataCardValue3.SelectedItems,Filter(FruitDetails,'Fruit Type'=Value).Title),"Value"))

    v-albai-msft_4-1623311268766.png

     

    3. For the last combo box, set its Items property to:

    AddColumns(RenameColumns(thirdtest,"Title","Value"),"Id",LookUp(FruitDetails,Title=Value,ID))

    v-albai-msft_5-1623311268770.png

    Check result this time.

    Best regards,

    Allen

  • Mikello-6626 Profile Picture
    90 on 07 Jun 2021 at 14:59:55
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    @v-albai-msft any assistance is appreciated

  • Mikello-6626 Profile Picture
    90 on 04 Jun 2021 at 04:57:31
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    I created 3 lookup lists instead of one because I figured that if I can just use the “Title” column from each lookup list into each combobox, I can avoid the use of Distinct. But then, how can I filter the values from one to another. I think a lookup column is making some difference and is not the same 

  • Mikello-6626 Profile Picture
    90 on 04 Jun 2021 at 04:44:00
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    @v-albai-msft I am getting kind of stuck here with multi-select lookup value. It seems like as soon as I add a Filter and Distinct function to the Items property of the comboboxes, the selected values don't get recorded in the SharePoint master list. This is my setup:

     

    Master List:

    Mikello-6626_0-1622780886141.png

    Master list column setup:

    Fruit_Mul, FruitType_Mul, FruitDetail_Mul are all lookup columns. 

    Mikello-6626_5-1622781139709.png

     

     

    Mikello-6626_3-1622781044454.png

     

    Mikello-6626_2-1622780989438.png

    Mikello-6626_4-1622781112357.png

     

    Lookup lists:

    I have 3 lookup lists - Fruit, Fruit Type, Fruit Detail

    All columns in lookup tables are Text fields

    Mikello-6626_6-1622781263929.png

    Second lookup list is Fruit Type with 2 columns: Title and Fruit

    Mikello-6626_7-1622781314110.png

    Third lookup is Fruit Detail with 3 columns: Title, Fruit, Fruit type

    Mikello-6626_8-1622781380393.png

    In Powerapps, as soon as I set Items property to Distinct(Fruits,Title) my values don't get recorded in SharePoint after submission:

    Mikello-6626_9-1622781519045.png

     

    Same problem with 2nd combobox displaying Fruit Types, both cascading and updating after submission is not working

    Mikello-6626_10-1622781728112.png

     

    Why is the multi selection value from Lookup column with Distinct/Filter functions not updating list item in SharePoint. Your help is much appreciated, Allen. 

     

  • v-albai-msft Profile Picture
    on 03 Jun 2021 at 01:56:48
    Re: Multiselect Combobox/Checkbox in 3 cascading levels

    Hi @Mikello-6626 ,

    Depends on your own configuration, you need to do some edit based on my formula.

    In my example, I am using three Text columns.

    If you are using lookup columns, for example for the first combo box, you should try formula like this:

    Distinct(list12,lookup1.Value)

    Best regards,

    Allen

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,692 Most Valuable Professional

Leaderboard
Loading started