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 / How to populate a gall...
Power Apps
Answered

How to populate a gallery from a search field, if the vlaue is null

(0) ShareShare
ReportReport
Posted on by 776

I have a Gallery where the Items property's function includes:

(varGalleryFilter = 5 && (
(dd_SearchField.Selected.Value = "LicensePlateNumber" && LicensePlateNumber = txt_SearchValue.Text) ||
(dd_SearchField.Selected.Value = "PermitNumber" && PermitNumber = txt_SearchValue.Text) ||
(dd_SearchField.Selected.Value = "RegistrantID" && RegistrantID = txt_SearchValue.Text) ||
(dd_SearchField.Selected.Value = "ResidenceBuilding" && ResidenceBuilding = txt_SearchValue.Text)
))

This works great if I select ResidenceBuilding in my dropdown "dd_SearchField" and txt_SearchValue Text field has a value, but if it is left blank, it doesn't return all of the SharePoint rows where ResidenceBuilding is null. How can I go about returning all SharePoint Lists rows where ResidenceBuildings are null?

Categories:
I have the same question (0)
  • scalca Profile Picture
    on at

    Try to add check for Blank value for example || IsBlank(ResidenceBuilding)

     

  • Verified answer
    WarrenBelz Profile Picture
    154,928 Most Valuable Professional on at

    Hi @Greg27 ,

    If you simply want to allow for a blank value in ResidenceBuildings - note the difference between IsBlank(ResidenceBuildings), which is not Delegable and ResidenceBuildings = Blank() which is Delegable.

    With(
     {
     _dd: dd_SearchField.Selected.Value,
     _txt: txt_SearchValue.Text,
     },
     (
     varGalleryFilter = 5 && 
     (
     (
     _dd = "LicensePlateNumber" && 
     LicensePlateNumber = _txt
     ) ||
     (
     _dd = "PermitNumber" && 
     PermitNumber = _txt
     ) ||
     (
     _dd = "RegistrantID" && 
     RegistrantID = _txt
     ) ||
     (
     _dd = "ResidenceBuilding" && 
     ResidenceBuilding = _txt
     ) ||
     ) ResidenceBuilding = Blank()
     )
    )

     

    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

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
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard