Home > Forum > Rules, JS, SQL > ANY TRUE bug?

ANY TRUE bug?
0

Hi,

we are using version 2025.2.1.179.

For a demonstration of a possible bug I've created a MSSQL data source with this query (the cat column can be ignored):
SELECT 123 AS ref, 1 AS cat, 'EQU' AS country
UNION ALL
SELECT 123 AS ref, 2 AS cat, 'EQU' AS country
UNION ALL
SELECT 123 AS ref, 3 AS cat, 'EQU' AS country
UNION ALL
SELECT 567 AS ref, 1 AS cat, 'ESP' AS country
UNION ALL
SELECT 567 AS ref, 1 AS cat, 'ESP' AS country
UNION ALL
SELECT 567 AS ref, 3 AS cat, 'ESP' AS country

Using this data source e.g. in a business rule or a user picker with this filter returns rows that would not be exected as shown in the screenshot.

An example filter expression:
[ref = 123] AND
[ANY TRUE[
[country = 'EQU']
[country = 'ESP]
]
]

Only the first three rows should be returned because of ref = 123. Using ANY TRUE skips the left condition of the AND (ref = 123) and returns all 6 rows.
Switching from ANY TRUE to OR returns only 3 rows as expected. (no screenshots for this one)

Same behaviour with using LIKE:
[ref = 123] AND
[ANY TRUE[
[country = 'EQU']
[country LIKE 'E%]
]
]

Is this a bug? Can anybody confirm this in a newer version? Right now we've no instance with a newer version.

Kind regards
Sébastien