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.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

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,866)