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 / filtering gallery text...
Power Apps
Answered

filtering gallery textbox + checkboxes SP list

(0) ShareShare
ReportReport
Posted on by 45

Hello, 

 

I'm currently trying to filter a gallery (from sharepoint list) where users will be able to display what they need, then select the record to open and review.

I have a textbox to filter by business, which is working fine with the following code.

Search('ESCALATION TRACKING',Txtnamefilter.Text,"Business")

 The complete gallery is displayed, and user is able to search by business text.
When i'm adding code to have the checkbox filter, the gallery contents disapear, and when check the checkbox, the record with the selected status is displayed.

Filter(Search('ESCALATION TRACKING',Txtnamefilter.Text,"Business"),NotStartedCheckbox.Value,Status.Value="Not Started")

NOTE : I only start with the checkbox "Not Started" for trials, then i will add the 3 others.

here what is displayed with the complete code

carltoune33_0-1675272281725.png

and when checking the checkbox

carltoune33_1-1675272365094.png

I'm for sure missing something, but not able to see what.

Thanks a lot for the help here.

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @carltoune33,

     

    You will need to change the filter slightly:

     

    Filter(
     Search('ESCALATION TRACKING', Txtnamefilter.Text, "Business")
     //Ignore filter when not checked, else filter by Not Started
     , !NotStartedCheckbox.Value || Status.Value = "Not Started"
    )

     


    You can extend the filter with other CheckBoxes in a similar fashion:

     

    Filter(
     Search('ESCALATION TRACKING', Txtnamefilter.Text, "Business")
     //Ignore Not Started filter when not checked, else filter by Not Started
     , !NotStartedCheckbox.Value || Status.Value = "Not Started"
     //Ignore Second Checkbox filter when not checked, ...
     , !SecondCheckbox.Value || Status.Value = "Second Status"
    )

     

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • carltoune33 Profile Picture
    45 on at

    @LaurensM 

    many thanks for the help, it is working fine as expected...

    Thanks 

  • carltoune33 Profile Picture
    45 on at

    Hi @LaurensM

     

    In addition to these filters that are working perfectly, I'm trying to filter another result, which is risk result (in a number column in the SP list) but not able to filter it.
    the values stored into the SP List column are like this :

    Between 1 and 4 => Broadly Acceptable

    Between 5 and 9 => Moderate

    Between 10 and 20 => Unacceptable

     

    i've added 3 checkboxes

    carltoune33_0-1675331012709.png

    carltoune33_1-1675331100784.png

     

     

    and tried the following code, but no success : 

     

    !'Broadly AcceptableCheckbox'.Value || 'Result risk' = "3"

     

    I can't add a . here as not supported.

    Goal here is to be able to filter using the 3 checkboxes.

     

    What am I again missing in the formula?

    thanks a lot

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @carltoune33,

     

    Since you are using checkboxes, I assume that you can select multiple at a time to extend the filter. Selecting 'Broadly Acceptable' and 'Moderate' would result in a filter from 1 to 9.

     

    In order to achieve this I used the filter below:

    Filter(
     DataSource,
     (Checkbox1.Value && number > 0) || (Checkbox1_1.Value && number > 4) || (Checkbox1_2.Value && number > 9) || (!Checkbox1.Value && !Checkbox1_1.Value && !Checkbox1_2.Value),
     (Checkbox1_2.Value && number < 21) || (Checkbox1_1.Value && number < 10) || (Checkbox1.Value && number < 5) || (!Checkbox1.Value && !Checkbox1_1.Value && !Checkbox1_2.Value)
    )

     

    Change the checkboxes to your specific case:

    • Checkbox1 = Broadly Acceptable
    • Checkbox1_1 = Moderate
    • Checkbox1_2 = Unacceptable

    If you only want users to make 1 selection at a time, you might want to use a Radio Button control instead.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • carltoune33 Profile Picture
    45 on at

    @LaurensM 

    Thanks a lot for your reply, 

    unfortunetly i've tried, and it is not working.
    on my hand i've tried the following way which is working

    Filter(
     Search('ESCALATION TRACKING',
     Txtnamefilter.Text,"Business")
     //
     , !NotStartedCheckbox.Value || Status.Value = "Not Started"
     , !InProgressCheckbox.Value || Status.Value = "In Progress"
     , !DelayedCheckbox.Value || Status.Value = "Delayed"
     , !CompletedCheckbox.Value || Status.Value = "Completed"
     , !EscalatedCheckbox.Value || Progress.Value = "0 - Escalated"
     , !InvestigationCheckbox.Value || Progress.Value = "1 - Investigation"
     , !ValidationCheckbox.Value || Progress.Value = "3 - Validation"
     , !ImplementationCheckbox.Value || Progress.Value = "4 - Implementation"
     , !BroadlyAcceptableCheckbox || 'Result risk' >= 1 && 'Result risk'<= 4
     , !ModerateCheckbox || 'Result risk' >= 5 && 'Result risk'<= 9
     , !UnacceptableCheckbox || 'Result risk' >= 10 && 'Result risk'<= 20
    
    )

     

    by the way i'm not able to do the following, regarding the checkboxes Status and Progress. I want to have the user able to click at least 2 checkboxes to have the result, but not able to perform that, do you have an idea?

    carltoune33_0-1675756217857.png

    When clicking 2 checkboxes at same time the gallery is empty, 

    carltoune33_1-1675756259345.png

     

    When only one of the 2 checkboxes, it is working fine..

     

    thanks for the help 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard