cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brickt
Regular Visitor

SOLVED (not a bug) - BUG: Or conditions in Filter statements are throwing an error (started a few days ago)

SOLVED - It turns out, it's not the Or function that's causing the issue, it's that a bit column value that used to be evaluated correctly when standing by itself (e.g., If(IsActive, true, false)) now needs to be written with the '=' sign (e.g., IsActive = true).

 

----------------------------------------------------------------

I have an app that uses Filter statemements in the Items property of some dropdown controls. I have been using Or conditions in the Filter statement successfully for a number of months, but all of a sudden, the controls that had been working are throwing an error. This feels like a bug since it used to work and the MS documentation for using Or conditions in Filter statements hasn't changed recently. I've tried using both the Or function and the || syntax, and they both cause the error. the And function and the && syntax are still working as before.

Here's an example of a statment that was working for the past several months, but now throws an error.

Filter(
Sort(
'[sts].[v_Project]',
Name
),
ClientId = varGlobalSelectedClientId,
Or((IsActive = varGlobalActiveOnly), IsActive)
)

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @brickt ,

Have you solved your problem?

Could you please show more details about the error message within your app?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

On your side, please also consisder modify your formula as below:

Filter(
       Sort(
            '[sts].[v_Project]',
             Name
        ),
        ClientId = varGlobalSelectedClientId,
        IsActive = varGlobalActiveOnly ||  IsActive = true
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @brickt ,

Have you solved your problem?

Could you please show more details about the error message within your app?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

On your side, please also consisder modify your formula as below:

Filter(
       Sort(
            '[sts].[v_Project]',
             Name
        ),
        ClientId = varGlobalSelectedClientId,
        IsActive = varGlobalActiveOnly ||  IsActive = true
)

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (47,421)