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 / Filter blank value bas...
Power Apps
Unanswered

Filter blank value based on checkbox

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

q14.png

When Contract checkbox is checked all the values which have blank values under contract field should disappear from gallery same for Training and Skill. Any ideas?

Categories:
I have the same question (0)
  • Verified answer
    Abhilash_Swain Profile Picture
    901 on at

    Hi @zmansuri 

    "On Check " for contract check Box, add UpdateContext({Chkcontract:!Chkcontract})

    "Items" in Gallery ,  If (ChkContract, Filter(Gallery source, !IsBlank(Contract),gallery Source).

     

    Please let me know if you get the error due to syntax, I will try in a sample table and share

  • Verified answer
    Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey.

    You should filter it.

     

    So, in Items property you should wirte something like this:

    If(CheckboxContract.Value = true; Filter(List; Contract != ""); List)

    So, if the checkbox is selected, it will filter the list and retrieve the contacts that have something. If not, it will retrieve the whole list

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I did it with this code.

     

    If(
     chkTraining.Value = true && chkSkill.Value = true,
     Filter(
     Zishan,
     !IsBlank(StatusForTraining) && !IsBlank(StatusForSkill)
     ),
     If(
     chkTraining.Value = true && chkSkill.Value = false,
     Filter(
     Zishan,
     !IsBlank(StatusForTraining)
     ),
     If(
     chkSkill.Value = true && chkTraining.Value = false,
     Filter(
     Zishan,
     !IsBlank(StatusForSkill)
     ),
     Zishan
     )
     )
    )

    Is there a better way?

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    I think not.. That is almost the solution that I was telling you about...

  • Abhilash_Swain Profile Picture
    901 on at

    Will it work if you filter the gallery without blank values and show all items when a user wants to see them.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard