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 Gallery Item ba...
Power Apps
Answered

Filter Gallery Item based on Check Box Selected Values

(0) ShareShare
ReportReport
Posted on by 108

Hi All,

I need to get the result in Gallery based on the value selected in the checkboxes. This is new automation for my existing application, hence i couldn't change the datatype for my Checkbox data. My source system is SP and having choice column with Checkbox choice option (Screenshot attached). 

suriyamv07_0-1657267621867.png

Used collection concept(written in APP component) to bring this checkbox item into Powerapps screen. (Attached screenshot) And brought input to checkbox using Index formula (screenshot attached)

suriyamv07_1-1657267887377.png

In Items property of Gallery written formula to filter the selected inputs. But getting incompatible types of comparison error.

suriyamv07_2-1657267988370.png

If(Check1.Value=false && Check2.Value=false && Check3.Value=false && Check4.Value=false,
Records,
Filter(Records,
If(Check1.Value, CheckBox_Item.Value ="India") ||
If(Check2.Value=true, CheckBox_Item.Value ="SA") ||
If(Check3.Value=true, CheckBox_Item.Value = "USA") ||
If(Check4.Value=true, CheckBox_Item.Value = "China")))

 

My List name - Records

Collection name - colChoices

List Column name - CheckBox_Item

Check Box field name powerapps screen - Check1, Check2, Check3, Check4

 

Could anyone please help me on how to solve this issues?

 

I need to bring checkbox data to front end and based on check boxes selection, gallery should display results.

 

Thanks in advance..

 

 

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, try the below, its working for me, i haven't really changed your code, just tidied it up. 


    If(!Check1.Value && !Check2.Value && !Check3.Value && !Check4.Value,
    Records,
    Filter(Records,
    If(Check1.Value, CheckBox_Item.Value = Check1.Text) ||
    If(Check2.Value, CheckBox_Item.Value = Check2.Text) ||
    If(Check3.Value, CheckBox_Item.Value = Check3.Text) ||
    If(Check4.Value, CheckBox_Item.Value = Check4.Text)))

  • Mx81 Profile Picture
    860 on at

    I would recommend you this video tutorial:

    https://www.youtube.com/watch?v=5dSk5iOgT68

     

  • suriyamv07 Profile Picture
    108 on at

    @C-Papa Thanks for your response. Even if i map the values directly, getting incompatible error for value comparison. Could you please let me know if i miss something? 

    suriyamv07_0-1657273537517.png

     

  • suriyamv07 Profile Picture
    108 on at

    @max81  Thanks for your response. I have followed as per this video instruction. But in my case , i am using sharepoint list and used choice datatype (checkbox) (For example Column name - CheckBox_Item) values. I can able to bring the checkbox data to Combobox . While mentioning the filter condition in Gallery, it is not accepting the checkbox column name(CheckBox_Item). 

  • C-Papa Profile Picture
    1,836 on at

    You have added '= Check1.Value' but it should be '= Check1.Text' as per my example

    you have also changed the name of the original choice column

  • suriyamv07 Profile Picture
    108 on at

    @C-Papa  Even if i mention the data as Check1.Text, receiving same error.

    Cleared cache and tried with new browser also.

     

    suriyamv07_0-1657275771873.png

     

  • Verified answer
    C-Papa Profile Picture
    1,836 on at

    Do you have the choice column set as multi select? try the below and see if it works, this will cause delegation issues so you will have issue if the list has more than 2000 records. if it is multi select does it need to be? for example, you are only select one in the example you have given. the above code should work if you turn of multi select

     

    If(!Check1.Value && !Check2.Value && !Check3.Value && !Check4.Value,
    Records,
    Filter(Records,
    If(Check1.Value, Check1.Text in CheckBox_Item.Value) ||
    If(Check2.Value, Check2.Text in CheckBox_Item.Value) ||
    If(Check3.Value, Check3.Text in CheckBox_Item.Value) ||
    If(Check4.Value, Check4.Text in CheckBox_Item.Value)))

  • suriyamv07 Profile Picture
    108 on at

    @C-Papa  Thank you so much!!!! Its working 🙂

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard