Filter - "and" doesn't seem to be working?

Hey team,
I’m having some challenges with one of my filters.


Basically I only want it to continue if the value $3.foundData comes back at false and if there is some kinda data in $8.projects.[0].toggl_client_id (so it’s not empty). But with the filter I’ve put in there as per the screenshot

It still continues when $3.foundData is returning true and node 8 client ID has data in it.
I would have expected the not($3.foundData) should make that false and because of the and compare the whole thing would come back as false. But it seems like the second one is overwriting the first false return.

1 Like

Operator “not” works with a boolean values, but
3.founddata is not a boolean (TRUE or FALSE)

Here is more detailed explanation of NOT function: 07.4 Functions | Latenode

You could use IF statement instead, it could be more readable

1 Like

A good way to check what exactly each part of your expression returns - you could add SetVariable node and place few variables inside with different part of your expression

1 Like

Found data should be boolean?
image
Unless it’s interpreting it as a string for some reason? But if I remove the “and not(”… then it seems works as just not($3.foundData)
image

1 Like

Here is a way to test your expressions:

1 Like

And this how “empty” function works.
Test data:
CleanShot 2024-09-09 at 15.28.12@2x

Result:

1 Like

Cool thanks that’s handy for testing what it’s doing.


That’s the result of the testing. So it seems to be detecting $.foundData as booleen properly and converting it to false.
And it seems to be detecting that the $8.project.toggl_client_id is not empty.
So in this instance its getting

false and true

So in my head that should come back false because they’re not both true (with that wholestring variable in the latest screenshot). Kinda like if I wrote a javascript if statement then saying if(true and false) I’d expect that to return false.

What am I missing here?

1 Like

One part of the final expression is FALSE, thats why the whole expression is FALSE too:
CleanShot 2024-09-10 at 19.13.53

1 Like

Which is what I would expect. But it’s not coming back as false. It’s coming back as true:

@Raian check pls this case

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.