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 / Add "ALL" option in ca...
Power Apps
Unanswered

Add "ALL" option in cascading dropdown and filter gallery

(0) ShareShare
ReportReport
Posted on by 145

Hi All,

 

I am trying to filter gallery and above that I have dropdowns. 

On button on select property I have added following formula-

iAM_BA_0-1688362197686.png

And added collection to dropdown. 

and on gallery Items I have added following formula

iAM_BA_1-1688362281895.png

I am trying to filter, but it's not filtering data. 

Looking for solution. 

Thanks!

 

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @iAM_BA ,

     

    Please try:

     

    Filter(
    LandDetails,
    (DdBusinessname.Selected.Result="All" || LRDID = LookUp(UnitDetails,DdBusinessname.Selected.Result=BusinessName).LRDID) And
    (DdCompanyname.Selected.Result="All" || LRDID = LookUp(UnitDetails,DdCompanyname.Selected.Result=ComanyName).LRDID) And
    (DdUnitname.Selected.Result="All" || LRDID = LookUp(UnitDetails,DdUnitname.Selected.Result=UnitDivisionName).LRDID)
    )

     

    Best Regards,

    Bof

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @iAM_BA ,

    Firstly can you please post your code in Text - the below is OCR's so watch spelling

    With( 
     {
     wBus:
     LookUp(
     UnitDetails,
     DdBusinessName.Selected.Result = BusinessName
     ).LRDID,
     wComp:
     LookUp(
     UnitDetails,
     DdCompanyname.Selected.Result = CompanyName
     ).LRDID,
     wUnit:
     LookUp(
     UnitDetails,
     DdUnitname.Selected.Result = UnitDivisionName
     ).LRDID
     },
     Filter(
     LandDetails,
     (DdBusinessname.Selected.Result="All" || LRDID = wBus) &&
     (DdCompanyName.Selected.Result = "All" || LRDID = wComp) &&
     (DdUnitname.Selected.Result = "All" || LRDID = wUnit)
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • iAM_BA Profile Picture
    145 on at

    HI @WarrenBelz 

    I am trying to set condition on Cascading dropdown as follows-

    Button-ClearCollect(colbusinessname,{Result:"All"});
    Collect(colbusinessname,ForAll(Sort(Distinct(UnitDetails,BusinessName),Value),{Result:ThisRecord.Value}));

    1st dropdown-Colbusinessname

    Onchange of 1st dropdown - ClearCollect(coldivision,{Result:"All"});
    Collect(coldivision,ForAll(Sort(Distinct(Filter(UnitDetails,CompanyName=DdCompanyname.Selected.Value),UnitDivisionName),{Result:ThisRecord.Value}))

     

    But in this formula is giving me error. 

     

    Then only I can check on gallery. 

     

  • WarrenBelz Profile Picture
    156,963 Most Valuable Professional on at

    Hi @iAM_BA ,

    Firstly there is a bit of confusion here on the hierarchy, but assuming Unit follows Business (not sure where COmpany comes into this)

    Your BusinessName drop-down Items

    Ungroup(
     Table(
     {
     Values: Table({Value: "All"})
     },
     { 
     Values: 
     Distinct(
     UnitDetails, 
     BusinessName
     )
     }
     ),
     "Values"
    )

    then your Unit drop-down Items

    Ungroup(
     Table(
     {
     Values: Table({Value: "All"})
     },
     { 
     Values: 
     Sort(
     Distinct(
     Filter(
     UnitDetails,
     BusinessName = DdBusinessName.Selected.Value
     ),
     UnitDivisionName
     ),
     Value
     )
     }
     ),
     "Values"
    )

    The output of these two is .Value, so any references to these in my earlier code need to be changed from .Result to .Value. 

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard