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.

Hi @v-monli-msft,

 

This solution works.

 

Thanks,

Rui

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,041)