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 can I filter checkbox
Power Apps
Unanswered

How can I filter checkbox

(0) ShareShare
ReportReport
Posted on by 6

I want to filter with checkbox to find my status column  in data table, I want to filter with TextInput, dropdown and checkbox, now I can filter just only TextInput and dropdown but checkbox I can not. My conditions are check status active(show data only status active) or inactive(show data only status inactive) and when uncheck in both checkbox data will show all status.

 

MY CODE

Filter(inventory_test01,
company.Value = Dropdown1.Selected.Value || IsBlank(Dropdown1)
, StartsWith(server_name_host , TextInput1.Text) || StartsWith(ip,TextInput1.Text)
)

pearlqules_0-1672975773984.png

 

Categories:
  • WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    Hi @pearlqules ,

    Try this- Assuming Status is a Text field - if a Choice Field, you will need Status.Value

    Filter(
     inventory_test01,
     (
     company.Value = Dropdown1.Selected.Value || 
     IsBlank(Dropdown1.Selected.Value)
     ) &&
     (
    	 StartsWith(
     server_name_host, 
     TextInput1.Text
     ) || 
     StartsWith(
     ip,
     TextInput1.Text
     ) 
     ) &&
     (
     (CheckBox1.Value && Status = "Active") ||
     (CheckBox2.Value && Status = "Inactive") ||
     (!CheckBox2.Value && !Checkbox2.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

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @pearlqules

    With({_items: If(Checkbox1.Value & ! Checkbox2.Value, Filter(inventory_test01, Status.Value="Active"),

    !Checkbox1.Value & Checkbox2.Value, Filter(inventory_test01, Status.Value="Inactive"),

    ! Checkbox1.Value & !Checkbox2.Value, inventory_test01)}, 

    Filter(_items ,
    company.Value = Dropdown1.Selected.Value || IsBlank(Dropdown1)
    , StartsWith(server_name_host , TextInput1.Text) || StartsWith(ip,TextInput1.Text)

    ) 

  • pearlqules Profile Picture
    6 on at

    Hello , WarrenBelz

    Thank you so much for your fast reply, I saw your post before you edit and you suggest to use with radio button , it helpful . Now I used radio  instead checkbox

     

    status = Radio1.Selected.Result || IsBlank(Radio1)

     

    but when filter I dont know why does it show like this

    pearlqules_1-1673022633551.png

    pearlqules_2-1673022743061.png

    and I try to follow your current suggest 'check box' it not works code show red underline maybe it is my mistake , so I try on my way

     

    Filter(inventory_test01,
    company.Value=Dropdown1.Selected.Value||IsBlank(Dropdown1) ,
    StartsWith(server_name_host,TextInput1.Text)||StartsWith(ip,TextInput1.Text) ,
    Checkbox1.Value && status = true || Checkbox2.Value && status = false ||
    !Checkbox1.Value && !Checkbox2.Value || Checkbox1.Value && Checkbox2.Value

    )

     

    it show like this

    pearlqules_3-1673023208790.png

    pearlqules_4-1673023227789.png

     

     

  • pearlqules Profile Picture
    6 on at

    Thank you,

    Sorry but  I have a question, I don't know '_items' in your code you mean my datasouse or not because I used _items it not show any data in display

     

    With({status:

    If(Checkbox1.Value & ! Checkbox2.Value, Filter(inventory_test01, status = true),

       !Checkbox1.Value & Checkbox2.Value, Filter(inventory_test01, status = false),

       ! Checkbox1.Value & !Checkbox2.Value, inventory_test01)}, 

    Filter(inventory_test01 ,
       company.Value = Dropdown1.Selected.Value || IsBlank(Dropdown1)
    , StartsWith(server_name_host , TextInput1.Text) || StartsWith(ip,TextInput1.Text)

    )

     )

     

    pearlqules_5-1673024310139.png

     

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

    @pearlqules ,

    There was a stray quotes character which I have now removed. I changed my post after I re-read it as I saw you had two checkboxes, not one, but a Radio control is probably a better idea. I do not fully understand your current question.

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard