cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Miguel_MESP
Helper II
Helper II

Filter a gallery on power apps based on sharepoint yes/no columns

Hey,

 

I have a power app screen where I'm using a gallery to show the sharepoint items related to the onboarding process.

Those items are created through other screens that have forms to fill. There are three main split steps that once they are complete the users click on a button and switch a sharepoint column from no to yes, consequently changing the circle icon above from gray to green.

 

I want to allow people to filter that gallery with checkboxes in a way that, when I click on the checkbox I get only the items wich that step isn't completed (gray color and value "no" at sharepoint list). But I want this to be cumulative. For example if I choose "SS e Fundos" and "Exame Médico" it shows me all items that this two columns have the value "No". Other point that improves the complexity is that I want to also have a filter that is already currently working to filter through employee name. 

 

Capture.PNG

 

Summarizing, I need a solution that mix all of this conditions.

 

Any idea? It can be some different approach. The only thing I need to maintain is the logic behind with the 3 yes/no columns.

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @Miguel_MESP ,

 

Would you like to filter your SP list on 3 Yes/No columns?

 

If so, please refer to below blog:

https://rezadorrani.com/index.php/2019/04/14/powerapps-filter-sharepoint-yes-no-column-bug/

 

As per the conclusion and current situation, Yes/No column would not be recommended to use in Power Apps since it’s non-delegable. I made a test to demonstrate:

 

checkbox.gif

1\ Set OnCheck of Check Box 1 to UpdateContext({varValue1: 0}) and OnUncheck of it to UpdateContext({varValue1: 1}), for the reason that Yes/No column would be stored as 1/0 in SharePoint list data. So do the other 2 Check Boxes but change variable names.

 

2\ Set Items of the Gallery to:

If(IsBlank(Textsearch.Text) && Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false, SPList,!IsBlank(Textsearch.Text) && Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false,Filter(SPList, Textsearch.Text in Title), IsBlank(Textsearch.Text),Filter(SPList,'Yes/No1' = varValue1,'Yes/No2' = varValue2,'Yes/No3' = varValue3),Search(Filter(SPList,'Yes/No1' = varValue1,'Yes/No2' = varValue2,'Yes/No3' = varValue3), Textsearch.Text," SearchColumn "))

 

To avoid delegation issue, please consider change the columns from Yes/No type to Text type, and change the search method from “in” to “StartsWith” as well. 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @Miguel_MESP ,

 

Would you like to filter your SP list on 3 Yes/No columns?

 

If so, please refer to below blog:

https://rezadorrani.com/index.php/2019/04/14/powerapps-filter-sharepoint-yes-no-column-bug/

 

As per the conclusion and current situation, Yes/No column would not be recommended to use in Power Apps since it’s non-delegable. I made a test to demonstrate:

 

checkbox.gif

1\ Set OnCheck of Check Box 1 to UpdateContext({varValue1: 0}) and OnUncheck of it to UpdateContext({varValue1: 1}), for the reason that Yes/No column would be stored as 1/0 in SharePoint list data. So do the other 2 Check Boxes but change variable names.

 

2\ Set Items of the Gallery to:

If(IsBlank(Textsearch.Text) && Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false, SPList,!IsBlank(Textsearch.Text) && Checkbox1.Value = false && Checkbox2.Value = false && Checkbox3.Value = false,Filter(SPList, Textsearch.Text in Title), IsBlank(Textsearch.Text),Filter(SPList,'Yes/No1' = varValue1,'Yes/No2' = varValue2,'Yes/No3' = varValue3),Search(Filter(SPList,'Yes/No1' = varValue1,'Yes/No2' = varValue2,'Yes/No3' = varValue3), Textsearch.Text," SearchColumn "))

 

To avoid delegation issue, please consider change the columns from Yes/No type to Text type, and change the search method from “in” to “StartsWith” as well. 

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (20,882)