cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
schuess2
Level: Powered On

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
Community Support Team
Community Support Team

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
Microsoft dinusc
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"

 

schuess2
Level: Powered On

Re: Filter using Checkbox

It is actually a yes/no field on SharePoint, toggle in PowerApps.
Microsoft dinusc
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)

schuess2
Level: Powered On

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
Microsoft dinusc
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)

Community Support Team
Community Support Team

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (6,281)