cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (24,471)