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 / Clear Collect table wi...
Power Apps
Unanswered

Clear Collect table with multiple values in one column

(0) ShareShare
ReportReport
Posted on by 1,599 Super User 2024 Season 1

Hello,

 

In my app I have a tabled section where I have a 'Waist' drop-down for the "Male Holster Pocket Trousers".
I additionally have a secondary drop-down for 'Leg Length'.

 

sudosaurus_0-1668180690157.png


This is a chart of all the sizes where the majority have S,R,T leg lengths available to them apart from 29 which is R, 46 which is R, T and 48 / 50 which are both R.

sudosaurus_1-1668180807641.png

 


In my ClearCollect expression below, Id ideally like to be able to (depending on which waist size is chosen) is for the Leg Length drop-down to either default to the only one option for it's corresponding size or show the options available to it's corresponding size.

 

ClearCollect(MaleHolsterTrousersTable,
{waist: "-"},
{waist: "28"},
{waist: "30"},
{waist: "32"},
{waist: "34"},
{waist: "36"},
{waist: "38"},
{waist: "40"},
{waist: "42"},
{waist: "44"},
{waist: "46"},
{waist: "48"},
{waist: "50"});

 
I'm using choice columns for all the other products where the Leg Length can apply to any size however in this specific one I need it to dynamically show the different options.

For example in the FemaleHolsterTrousersTable, I have set legLengths for each size and waist selection - I just dont know how I can specificy multiple legLength values per waist choice in the above expression??

 

ClearCollect(FemaleHolsterTrousersTable,
{size: "-", waist: "-", legLength: "-"},
{size: "8", waist: "26", legLength: "37"},
{size: "10", waist: "28", legLength: "37"},
{size: "12", waist: "30", legLength: "39"},
{size: "14", waist: "32", legLength: "41"},
{size: "16", waist: "34", legLength: "43"},
{size: "18", waist: "36", legLength: "45"},
{size: "20", waist: "38", legLength: "47"});

 
 Any help would be really appreciated.

 

Thanks 🙂

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sudosaurus 

    This can all be achieved by the cascade of your dropdown choices.

    I would provide some more details, but I am not understanding your correlation of the data in your post.  You show a table of sizes, but they don't seem to correlate to the data you have in your formulas.  

    Can you expand a little on the leg length choices for the various waist sizes and the correlation to the overall size?

     

    Essentially, you have a hierarchy in your data, but your formulas do not reflect that.

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @RandyHayes 

     

    An example of 3 different sizes with different leg length choices.

     

    Waist   283046
    Leg LengthRS,R,TR,T

     

    The expection is that when 28 is selected on the 'Waist' dropdown, that you would only be given the Leg Length option of "R" and equally for 30 you would get the choices of "S", "R" & "T" - or with 46 you would be given the choice of "R" or "T". 

     

    Does this make more sense?

    I understand how to acheieve it  cascading when using the FemaleHolsterTrousersTable as each of the sizes have their own specific Leg Length - unlike the above where they have multiple depending on the waist size. 

    ClearCollect(FemaleHolsterTrousersTable,
    {size: "8", waist: "26", legLength: "37"},

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sudosaurus 

    Yes, I got that part from the original details you had.  I was looking for a little more granularity in the sizing charts and the comparison between the two genders.

     

    But what is missing from this is, you have a Size - how does that enter into the chart?  For example, the only correlation I could determine from the post was that there was a Size of 14 and it had a choice of a waist size of 32 (this was from the first row of your screenshot).

    But I am not getting how the size fits into the chart.  There is no size value there!?

    And, I only point that all out because your last formula contains a size value, but no correlating Waist values.

     

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @RandyHayes 

     

    The size column is generally just for female clothing. Where for male clothing, this starts from the "Waist" column. 

     

    The 'items' value of the Waist dropdown = 

    Distinct(MaleHolsterTrousersTable,waist)


    So I would expect the Leg Length dropdown to look something like how the one below works...

    Size: 

    Distinct(FemaleHolsterTrousersTable,size)


    Waist: 

    Distinct(Filter(FemaleHolsterTrousersTable, size = LadiesHolsterTrousersSize_dd.Selected.Result),waist)


    Leg Length: 

    Distinct(Filter(FemaleHolsterTrousersTable, size = LadiesHolsterTrousersWaist_dd.Selected.Result),legLength)

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sudosaurus 

    So, what I am still not really seeing is the relation and correlation of the data.  I understand how the formulas work, that is clear.  It is how the data is in the hierarchy. 

     

    So, I will speculate with some samples for this.

     

    The Data as I see it is best combined and the relationship built into the data.

    So, the formula for the table (no collection overhead is needed) is the following:

    Set(TrousersTable,
     Table(
     {gender: "Male", 
     sizes: 
     Table({size: "All", 
     waists: 
     Table(
     {Value: "28", legLengths: ["R"]},
     {Value: "30", legLengths: ["S", "R", "T"]},
     {Value: "46", legLengths: ["R", "T"]}
     )
     }
     )
     },
     {gender: "Female",
     sizes: 
     Table({size: "8", 
    	 waists: 
     Table(
     {Value: "26", legLengths: ["R"]},
     {Value: "30", legLengths: ["S", "R", "T"]},
     {Value: "46", legLengths: ["R", "T"]}
     )
     },
     {size: "10", 
     	 waists: 
     Table(
     {Value: "28", legLengths: ["R"]},
     {Value: "30", legLengths: ["S", "R", "T"]},
     {Value: "46", legLengths: ["R", "T"]}
     )
     } 
     )
     }
     )
    ) 

    In the above, the table has records for both genders.  Each record has a table of Sizes.  Each Size has a table of Waist sizes and then each waist size has a table of leg lengths.

     

    How this would translate into the dropdowns would be as follows:

    For the Size dropdown, (I assume there is something specific to the underlying gallery record that determines that the item is for male or female - I will call it a gender column for the moment).

    The formula for the Items property would be:

    Filter(TroustersTable, gender = ThisItem.Gender)

    This dropdown can be set to not be visible if there is only one size available (as in the case of the male items).  The visible property of the dropdown would be:

    CountRows(Self.Selected.sizes)<2

     

    The Items property for the Waists dropdown would become:

    ItemSizeDropdownName.Selected.sizes

     

    The Items property for the LegLengths dropdown would become:

    ItemWaistDropdownName.Selected.legLengths

     

    And that is it...this would provide what you need, plus it would also account for both genders without having additional tables (collections) for each.

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @RandyHayes 

     

    I will try to make sense of that and see if I can apply it to what I've got goingon in my app.

     

    For reference, this is the entirety of my App onStart property - which shows all the different product tables and their sizing. 

     

    Set(
     clTheme,
     {
     clBlue: BlueSquare.Fill,
     clDarkBlue: DarkBlueSquare.Fill,
     clRed: RedSquare.Fill,
     clYellow: YellowSquare.Fill,
     clWhite: WhiteSquare.Fill,
     clGreen: GreenSquare.Fill
     }
    );
    
    Set(
     ftTheme,FontLabel.Font
    );
    ClearCollect(ShoeSizeTable,
    {shoe: "2059", size: "6"},
    {shoe: "2059", size: "7"},
    {shoe: "2059", size: "8"},
    {shoe: "2059", size: "9"},
    {shoe: "2059", size: "10"},
    {shoe: "2059", size: "11"},
    {shoe: "2059", size: "12"},
    {shoe: "2688", size: "6"},
    {shoe: "2688", size: "7"},
    {shoe: "2688", size: "8"},
    {shoe: "2688", size: "9"},
    {shoe: "2688", size: "10"},
    {shoe: "2688", size: "11"},
    {shoe: "2688", size: "12"},
    {shoe: "3993", size: "6"},
    {shoe: "3993", size: "7"},
    {shoe: "3993", size: "8"},
    {shoe: "3993", size: "9"},
    {shoe: "3993", size: "10"},
    {shoe: "3993", size: "11"},
    {shoe: "3993", size: "12"},
    {shoe: "52105", size: "4"},
    {shoe: "52105", size: "5"},
    {shoe: "52105", size: "6"},
    {shoe: "52105", size: "7"},
    {shoe: "52105", size: "8"},
    {shoe: "52105", size: "9"},
    {shoe: "52105", size: "10"},
    {shoe: "52105", size: "11"},
    {shoe: "52105", size: "12"},
    {shoe: "52105", size: "13"},
    {shoe: "152PP", size: "3"},
    {shoe: "152PP", size: "4"},
    {shoe: "152PP", size: "5"},
    {shoe: "152PP", size: "6"},
    {shoe: "152PP", size: "7"},
    {shoe: "152PP", size: "8"},
    {shoe: "152PP", size: "9"},
    {shoe: "152PP", size: "10"},
    {shoe: "152PP", size: "11"},
    {shoe: "152PP", size: "12"},
    {shoe: "152PP", size: "13"},
    {shoe: "AP313CM", size: "6"},
    {shoe: "AP313CM", size: "7"},
    {shoe: "AP313CM", size: "8"},
    {shoe: "AP313CM", size: "9"},
    {shoe: "AP313CM", size: "10"},
    {shoe: "AP313CM", size: "11"},
    {shoe: "AP313CM", size: "12"},
    {shoe: "AP315CM", size: "6"},
    {shoe: "AP315CM", size: "7"},
    {shoe: "AP315CM", size: "8"},
    {shoe: "AP315CM", size: "9"},
    {shoe: "AP315CM", size: "10"},
    {shoe: "AP315CM", size: "11"},
    {shoe: "AP315CM", size: "12"},
    {shoe: "Braddock", size: "3"},
    {shoe: "Braddock", size: "4"},
    {shoe: "Braddock", size: "5"},
    {shoe: "Braddock", size: "6"},
    {shoe: "Braddock", size: "7"},
    {shoe: "Braddock", size: "8"},
    {shoe: "Braddock", size: "9"},
    {shoe: "Braddock", size: "10"},
    {shoe: "Braddock", size: "11"},
    {shoe: "Braddock", size: "12"},
    {shoe: "Braddock", size: "13"},
    {shoe: "BX331", size: "3"},
    {shoe: "BX331", size: "4"},
    {shoe: "BX331", size: "5"},
    {shoe: "BX331", size: "6"},
    {shoe: "BX331", size: "7"},
    {shoe: "BX331", size: "8"},
    {shoe: "BX331", size: "9"},
    {shoe: "BX331", size: "10"},
    {shoe: "BX331", size: "11"},
    {shoe: "BX331", size: "12"},
    {shoe: "BX331", size: "13"},
    {shoe: "BX370", size: "3"},
    {shoe: "BX370", size: "4"},
    {shoe: "BX370", size: "5"},
    {shoe: "BX370", size: "6"},
    {shoe: "BX370", size: "7"},
    {shoe: "BX370", size: "8"},
    {shoe: "BX370", size: "9"},
    {shoe: "BX370", size: "10"},
    {shoe: "BX370", size: "11"},
    {shoe: "BX370", size: "12"},
    {shoe: "BX370", size: "13"},
    {shoe: "BX380", size: "3"},
    {shoe: "BX380", size: "4"},
    {shoe: "BX380", size: "5"},
    {shoe: "BX380", size: "6"},
    {shoe: "BX380", size: "7"},
    {shoe: "BX380", size: "8"},
    {shoe: "BX380", size: "9"},
    {shoe: "BX380", size: "10"},
    {shoe: "BX380", size: "11"},
    {shoe: "BX380", size: "12"},
    {shoe: "BX380", size: "13"},
    {shoe: "BX610", size: "3"},
    {shoe: "BX610", size: "4"},
    {shoe: "BX610", size: "5"},
    {shoe: "BX610", size: "6"},
    {shoe: "BX610", size: "7"},
    {shoe: "BX610", size: "8"},
    {shoe: "BX610", size: "9"},
    {shoe: "BX610", size: "10"},
    {shoe: "BX610", size: "11"},
    {shoe: "BX610", size: "12"},
    {shoe: "BX610", size: "13"},
    {shoe: "BX630", size: "3"},
    {shoe: "BX630", size: "4"},
    {shoe: "BX630", size: "5"},
    {shoe: "BX630", size: "6"},
    {shoe: "BX630", size: "7"},
    {shoe: "BX630", size: "8"},
    {shoe: "BX630", size: "9"},
    {shoe: "BX630", size: "10"},
    {shoe: "BX630", size: "11"},
    {shoe: "BX630", size: "12"},
    {shoe: "BX630", size: "13"},
    {shoe: "BX860", size: "6"},
    {shoe: "BX860", size: "7"},
    {shoe: "BX860", size: "8"},
    {shoe: "BX860", size: "9"},
    {shoe: "BX860", size: "10"},
    {shoe: "BX860", size: "11"},
    {shoe: "BX860", size: "12"},
    {shoe: "Delia", size: "3"},
    {shoe: "Delia", size: "4"},
    {shoe: "Delia", size: "5"},
    {shoe: "Delia", size: "6"},
    {shoe: "Delia", size: "7"},
    {shoe: "Delia", size: "8"},
    {shoe: "Elaine", size: "3"},
    {shoe: "Elaine", size: "4"},
    {shoe: "Elaine", size: "5"},
    {shoe: "Elaine", size: "6"},
    {shoe: "Elaine", size: "7"},
    {shoe: "JDR01", size: "5"},
    {shoe: "JDR01", size: "6"},
    {shoe: "JDR01", size: "7"},
    {shoe: "JDR01", size: "8"},
    {shoe: "JDR01", size: "9"},
    {shoe: "JDR01", size: "10"},
    {shoe: "JDR01", size: "11"},
    {shoe: "JDR01", size: "12"},
    {shoe: "Kick", size: "6"},
    {shoe: "Kick", size: "7"},
    {shoe: "Kick", size: "8"},
    {shoe: "Kick", size: "9"},
    {shoe: "Kick", size: "10"},
    {shoe: "Kick", size: "11"},
    {shoe: "Reno", size: "5"},
    {shoe: "Reno", size: "6"},
    {shoe: "Reno", size: "7"},
    {shoe: "Reno", size: "8"},
    {shoe: "Reno", size: "9"},
    {shoe: "Reno", size: "10"},
    {shoe: "Reno", size: "11"},
    {shoe: "Reno", size: "12"},
    {shoe: "KEA113", size: "6"},
    {shoe: "KEA113", size: "7"},
    {shoe: "KEA113", size: "8"},
    {shoe: "KEA113", size: "9"},
    {shoe: "KEA113", size: "10"},
    {shoe: "KEA113", size: "11"},
    {shoe: "KEA113", size: "12"},
    {shoe: "ST300", size: "3"},
    {shoe: "ST300", size: "4"},
    {shoe: "ST300", size: "5"},
    {shoe: "ST300", size: "6"},
    {shoe: "ST300", size: "7"},
    {shoe: "ST300", size: "8"},
    {shoe: "ST300", size: "9"},
    {shoe: "ST300", size: "10"},
    {shoe: "ST300", size: "11"},
    {shoe: "ST300", size: "12"},
    {shoe: "ST300", size: "13"},
    {shoe: "ST650", size: "2"},
    {shoe: "ST650", size: "3"},
    {shoe: "ST650", size: "4"},
    {shoe: "ST650", size: "5"},
    {shoe: "ST650", size: "6"},
    {shoe: "ST650", size: "7"},
    {shoe: "ST650", size: "8"},
    {shoe: "ST650", size: "9"},
    {shoe: "ST650", size: "10"},
    {shoe: "ST650", size: "11"},
    {shoe: "ST650", size: "12"},
    {shoe: "Strike", size: "6"},
    {shoe: "Strike", size: "7"},
    {shoe: "Strike", size: "8"},
    {shoe: "Strike", size: "9"},
    {shoe: "Strike", size: "10"},
    {shoe: "Strike", size: "11"},
    {shoe: "Strike", size: "12"},
    {shoe: "Surge", size: "3"},
    {shoe: "Surge", size: "4"},
    {shoe: "Surge", size: "5"},
    {shoe: "Surge", size: "6"},
    {shoe: "Surge", size: "7"},
    {shoe: "Surge", size: "8"},
    {shoe: "Surge", size: "9"},
    {shoe: "Surge", size: "10"},
    {shoe: "Surge", size: "11"},
    {shoe: "Surge", size: "12"},
    {shoe: "Surge", size: "13"},
    {shoe: "Surge", size: "14"},
    {shoe: "Surge", size: "15"},
    {shoe: "Surge", size: "16"},
    {shoe: "VX950-BLACK", size: "6"},
    {shoe: "VX950-BLACK", size: "7"},
    {shoe: "VX950-BLACK", size: "8"},
    {shoe: "VX950-BLACK", size: "9"},
    {shoe: "VX950-BLACK", size: "10"},
    {shoe: "VX950-BLACK", size: "11"},
    {shoe: "VX950-BLACK", size: "12"},
    {shoe: "Wanda", size: "3"},
    {shoe: "Wanda", size: "4"},
    {shoe: "Wanda", size: "5"},
    {shoe: "Wanda", size: "6"},
    {shoe: "Wanda", size: "7"},
    {shoe: "Wanda", size: "8"});
    
    ClearCollect(FemaleOfficeTrousersTable,
    {size: "-", waist: "-"},
    {size: "8", waist: "37"},
    {size: "10", waist: "39"},
    {size: "12", waist: "41"},
    {size: "14", waist: "43"},
    {size: "16", waist: "45"},
    {size: "18", waist: "47"},
    {size: "20", waist: "47"},
    {size: "22", waist: "51"},
    {size: "24", waist: "53"},
    {size: "26", waist: "55"},
    {size: "28", waist: "55"},
    {size: "30", waist: "55"});
    
    ClearCollect(FemaleHolsterTrousersTable,
    {size: "-", waist: "-", legLength: "-"},
    {size: "8", waist: "26", legLength: "37"},
    {size: "10", waist: "28", legLength: "37"},
    {size: "12", waist: "30", legLength: "39"},
    {size: "14", waist: "32", legLength: "41"},
    {size: "16", waist: "34", legLength: "43"},
    {size: "18", waist: "36", legLength: "45"},
    {size: "20", waist: "38", legLength: "47"});
    
    ClearCollect(MaleHolsterTrousersTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"},
    {waist: "46"},
    {waist: "48"},
    {waist: "50"});
    
    ClearCollect(UnisexLightweightTradesHolsterTrouserTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"},
    {waist: "46"},
    {waist: "48"},
    {waist: "50"});
    
    ClearCollect(MaleCleanJanTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"},
    {waist: "46"},
    {waist: "48"},
    {waist: "50"},
    {waist: "52"});
    
    ClearCollect(FemaleCleanJanTable,
    {size: "-", waist: "-"},
    {size: "6", waist: "29.5"},
    {size: "8", waist: "31.5"},
    {size: "10", waist: "33.5"},
    {size: "12", waist: "35.5"},
    {size: "14", waist: "37.5"},
    {size: "16", waist: "39.5"},
    {size: "18", waist: "41.5"},
    {size: "20", waist: "43.5"},
    {size: "22", waist: "45.5"},
    {size: "24", waist: "47.5"},
    {size: "26", waist: "49.5"},
    {size: "28", waist: "51.5"});
    
    ClearCollect(MaleBlackOfficeTrousersTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"});
    
    ClearCollect(FemaleMascotShortsTable,
    {size: "-"},
    {size: "6"},
    {size: "8"},
    {size: "10"},
    {size: "12"},
    {size: "14"},
    {size: "16"},
    {size: "18"},
    {size: "20"},
    {size: "22"},
    {size: "24"},
    {size: "26"},
    {size: "28"});
    
    ClearCollect(MaleBerteeShortsTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"},
    {waist: "46"},
    {waist: "48"});
    
    ClearCollect(UnisexShortsBlackTable,
    {waist: "-"},
    {waist: "28"},
    {waist: "30"},
    {waist: "32"},
    {waist: "34"},
    {waist: "36"},
    {waist: "38"},
    {waist: "40"},
    {waist: "42"},
    {waist: "44"},
    {waist: "46"},
    {waist: "48"});
    
    ClearCollect(FemaleOxfordWhiteShirt,
    {size: "-", Bust: "-"},
    {size: "6", Bust: "28"},
    {size: "8", Bust: "30"},
    {size: "10", Bust: "32"},
    {size: "12", Bust: "34"},
    {size: "14", Bust: "36"},
    {size: "16", Bust: "38"},
    {size: "18", Bust: "40"},
    {size: "20", Bust: "42"},
    {size: "22", Bust: "44"},
    {size: "24", Bust: "46"},
    {size: "26", Bust: "48"},
    {size: "28", Bust: "50"});
    
    
    ClearCollect(MaleOxfordWhiteShirt,
    {chest: "-", Neck: "-"},
    {chest: "32-34", Neck: "13.5"},
    {chest: "35", Neck: "14"},
    {chest: "36-38", Neck: "14.5"},
    {chest: "39", Neck: "15"},
    {chest: "40", Neck: "15.5"},
    {chest: "41", Neck: "16"},
    {chest: "42", Neck: "16.5"},
    {chest: "43", Neck: "17"},
    {chest: "44", Neck: "17.5"},
    {chest: "45", Neck: "18"},
    {chest: "46-48", Neck: "18.5"},
    {chest: "49", Neck: "19"},
    {chest: "50-52", Neck: "19.5"},
    {chest: "54-56", Neck: "20"},
    {chest: "58-60", Neck: "21"},
    {chest: "62-64", Neck: "22"},
    {chest: "66-68", Neck: "23"});

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 617

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard