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 return all Item...
Power Apps
Unanswered

How to return all Items in gallery where dropdown filter is blank

(0) ShareShare
ReportReport
Posted on by

Hello all,

I have 2 dropdown boxes that filters my gallery items when selected. It works when something is selected, but I would like to be able to select ‘blank’ and then have it return all of the values. At present the drop down will return no values if ‘blank’ is selected.

The dropdown boxes take data from a Sharepoint list:-

 

Distinct('Change Log', Area)

 

I have changed the ‘AllowEmptySelection’ Property from the dropdown boxes to ‘True’ to generate the ‘blank’ item in the dropdown and my current formula in the gallery states:-

 

Filter('Change Log', Dropdown1_1.Selected.Result = Area, Dropdown1_2.Selected.Result = Eng,'Action'.Value = "Completed" Or 'Action'.Value = "Error")

 

Any suggestions on how I can amend the formula so ‘blank’ can show all items, as currently ‘blank’ will return no items?

 

Many thanks for any help,

 

CF

Categories:
I have the same question (0)
  • zmorek Profile Picture
    3,272 on at

    Just wrap it in an If() statement where if the dropdown is blank, show the whole data source. Something like: 

    If(IsBlank(Dropdown1_1.Selected.Result), 'Change Log', Filter('Change Log', Dropdown1_1.Selected.Result = Area, Dropdown1_2.Selected.Result = Eng,'Action'.Value = "Completed" Or 'Action'.Value = "Error"))

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Try this,

    Filter('Change Log',
    	If(IsBlank(Dropdown1_1.Selected), true,Dropdown1_1.Selected.Result = Area) &&
    	If(IsBlank(Dropdown1_2.Selected), true,Dropdown1_1.Selected.Result = Eng) &&
    	('Action'.Value = "Completed" || 'Action'.Value = "Error")
    )
  • Community Power Platform Member Profile Picture
    on at

    Hi @CNT  & @zmorek ,

     

    Many thanks for your responses.

     

    I am a bit new to powerapps, so apologies if this is a stupid question:-

     

    I now have a delegation warning. Is this due to the 'If' statement? My data is a large growing sharepoint dataset with potentially 30,000+ records. Is there a way of putting the expression below without getting a delegation warning? 

     

    Filter('Change Log',
    	If(IsBlank(Dropdown1_1.Selected), true,Dropdown1_1.Selected.Result = Area) &&
    	If(IsBlank(Dropdown1_2.Selected), true,Dropdown1_1.Selected.Result = Eng) &&
    	('Action'.Value = "Completed" || 'Action'.Value = "Error")
    )

     Many thanks,

     

    CF

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    IsBlank(Dropdown1.Selected.Result) won't delegate in SharePoint but it is the same as Dropdown1.Selected.Result=Blank() which will delegate as will Len(Dropdown1.Selected.Result)=0. 

  • Community Power Platform Member Profile Picture
    on at

    Hi all again,

     

    Apologies, as I know that I am doing something wrong here, I am just not exactly sure what it is.

     

    This formula from @CNT  works except for a delegation warning (and I am working with a large dataset)

    Filter('Change Log',
    	If(IsBlank(Dropdown1_1.Selected), true,Dropdown1_1.Selected.Result = Area) &&
    	If(IsBlank(Dropdown1_2.Selected), true,Dropdown1_2.Selected.Result = Eng) &&
    	('Action'.Value = "Completed" || 'Action'.Value = "Error")
    )

     

    Does anyone know how put the above into a delegatable formula?

     

    I have tried the suggestions that @Drrickryp kindly provided:-

     

    Filter('ADM Change Log',
    If(Dropdown1_1.Selected.Result=Blank(),Dropdown1_1.Selected.Result = Area) &&
    If(Dropdown1_2.Selected.Result=Blank(),Dropdown1_2.Selected.Result = Eng) &&
    ('Action'.Value = "Completed" || 'Action'.Value = "Error")
    )

     

    I have also tried a version with Len(Dropdown1.Selected.Result)=0 but I am unable to get this to work either. Both methods return no records in the filter and I still get a delegation warning.

     

    I am obviously doing something very wrong here. Does anyone have any ideas?

     

    Many thanks for any help,

     

    CF

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Try this,

    With({vardd1:IsBlank(Dropdown1_1.Selected),
     vardd2:IsBlank(Dropdown1_2.Selected)},
    	Filter('Change Log',
    		If(vardd1, true,Dropdown1_1.Selected.Result = Area) &&
    		If(vardd2, true,Dropdown1_2.Selected.Result = Eng) &&
    		('Action'.Value = "Completed" || 'Action'.Value = "Error")
    	)
    )
  • Community Power Platform Member Profile Picture
    on at

    Many thanks for this @CNT 

    I really appreciate your time helping me with this.

     

    This formula works well again, except I am still receiving the delegation warning. My dropdowns are from a Sharepoint list, so I don't know if this is the problem?

     

    Is it possible that this may be working, even though I am receiving a delegation warning?

     

    Many thanks,

     

    CF

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous Can you share a screenshot so that I can see in which part of the formula exactly you are getting the delegation warning.

  • Community Power Platform Member Profile Picture
    on at

     

    Hi @CNT 

     

    Does this help?

     

    ClemFandandgo_0-1627997648024.png

     

     

     

    ClemFandandgo_1-1627997721618.png

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Anonymous I need to see the formula.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard