cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Filter using Checkbox

I can't figure out what i am doing wrong here. Object: When Flagged Checkedbox is Checked, only show items in gallery that have the flagged value toggled to true. Formula: If(Checkbox1.Value=true,Filter(SCRUMLog,Flagged=false),SCRUMLog)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Filter using Checkbox

HI @schuess2,

It is a known issue that there is something issue with Yes/No type column of SP list within PowerApps.

The user @skylitedave has faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/BUG-YESNO-SharePoint-Filtering/td-p/111123

Please modify your formula as below:

If(Checkbox1.Value=true, Filter(SCRUMLog, Flagged <> false), SCRUMLog)

Or

If(Checkbox1.Value=true, Filter(SCRUMLog, Flagged = 1), SCRUMLog)

 

In addition, you could also consider take a try to save your SP list records into a Collection within your app, then use the Collection as data source within your Gallery. After that, you could filter your Gallery based on the Yes/No type column as expected.

I have made a test on my side, please take a try with the following workaround:

Set the OnVisible proeprty of the first screen of your app to following:

ClearCollection(RecordsCollection, SCRUMLog)

Set the Items property of the Gallery control to following:

If(
Checkbox1.Value=true,
Filter(RecordsCollection, Flagged = true),
RecordsCollection
)

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Microsoft
Microsoft

Re: Filter using Checkbox

Hello @schuess2,

 

Is your SCRUMLog.Flagged of type "text" by any chance? If so then your formula should be:

If(Checkbox1.Value=true,Filter(SCRUMLog,Flagged="true"),SCRUMLog)

Note the quotes around "true"

 

Highlighted
Helper I
Helper I

Re: Filter using Checkbox

It is actually a yes/no field on SharePoint, toggle in PowerApps.
Highlighted
Microsoft
Microsoft

Re: Filter using Checkbox

Thank you for clarifying. This is weird. We will investigate this issue further. Meanwhile, I verified that the following formula works instead so please use it for now:

If(Checkbox1.Value=true,Filter(SCRUMLog,Flagged<>false),SCRUMLog)

Highlighted
Helper I
Helper I

Re: Filter using Checkbox

Hi dinusc, thanks for your help. in my original post, i had the wrong formula, i meant to have Flagged = true, but either way it still wasn't working. THanks for the temporary fix, you can ignore this screen cap
Highlighted
Microsoft
Microsoft

Re: Filter using Checkbox

According to your picture the formula is working properly. Please note that it is different from the one I suggested. 

Your formula gets all the items that are not "true" which matches the result. Please try this:

If(Checkbox1.Value=true,Filter(SCRUMLog,Flagged<>false),SCRUMLog)

Highlighted
Community Support
Community Support

Re: Filter using Checkbox

HI @schuess2,

It is a known issue that there is something issue with Yes/No type column of SP list within PowerApps.

The user @skylitedave has faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/BUG-YESNO-SharePoint-Filtering/td-p/111123

Please modify your formula as below:

If(Checkbox1.Value=true, Filter(SCRUMLog, Flagged <> false), SCRUMLog)

Or

If(Checkbox1.Value=true, Filter(SCRUMLog, Flagged = 1), SCRUMLog)

 

In addition, you could also consider take a try to save your SP list records into a Collection within your app, then use the Collection as data source within your Gallery. After that, you could filter your Gallery based on the Yes/No type column as expected.

I have made a test on my side, please take a try with the following workaround:

Set the OnVisible proeprty of the first screen of your app to following:

ClearCollection(RecordsCollection, SCRUMLog)

Set the Items property of the Gallery control to following:

If(
Checkbox1.Value=true,
Filter(RecordsCollection, Flagged = true),
RecordsCollection
)

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,391)