cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chandu
Helper III
Helper III

Filtering is not getting correct for Datatype BIT in sql server through powerapps

Filter('[dbo].[TEST_DATA]', TEST_TYPE = varTestType && TASK_ID = Value(DataCardValue52.Text) && ISACTIVE = "1")

I am having a Gallery, where I am filtering Gallery based on above formula.

When I Click PTI Button in top right corner, Then: Test_Type='PTI' , TASK_ID = Getting Value from DisplayForm and ISACTIVE = "1" (Datatype = BIT in SQL). 

When I Click PTI Button in top right corner, Then: Test_Type='PDI' , TASK_ID = Getting Value from DisplayForm and ISACTIVE = "1" (Datatype = BIT in SQL)

ISACTIVE.PNGNow, my Issue is I am getting Warning Error, and filtering is not happening, when I added ISACTIVE = "1" in Filter() and for PTI Gallery Items ISACTIVE = "1", for PDI Gallery Items ISACTIVE = "0".

According to my formula, when I click PTI it must show Items where ISACTIVE = "1". But, it is showing blank.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @Chandu ,

 

BIT values in SQL have 3 possible values: true, false, null. Please use true, false to Filter the gallery instead.

 

Regards,

Mona

Community Support Team _ Mona Li
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

Hi @v-monli-msft,

 

This solution works.

 

Thanks,

Rui

View solution in original post

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Chandu ,

 

BIT values in SQL have 3 possible values: true, false, null. Please use true, false to Filter the gallery instead.

 

Regards,

Mona

Community Support Team _ Mona Li
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

Hi @v-monli-msft,

 

This solution works.

 

Thanks,

Rui

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,846)