Expected type for argument in if function is bool

Hey team,
I keep getting this error:


Error in field: phone . The expected type for 2 argument in the if function: bool . You have passed: string .

This is the field:

I’m wanting it to be if phoneNumber = null (bool) or null (string) then enter the results from the previous node. Else enter other results.

I’m guessing I’m using the operator incorrectly here somehow?

the issue is here:

129.phoneNumber = null or null

The problem is that the second null isn’t part of a proper condition. It’s just a raw value, not a comparison. The system expects the entire condition to return true or false, but this breaks that logic.

That’s why the if function throws an error — it doesn’t receive a valid boolean expression as the first argument.


Try rewriting it like this:

129.phoneNumber = null or 129.phoneNumber = "null"

Now both parts are full comparisons:

  • The first checks if the value is actually null
  • The second checks if the value is the string "null"

And then place this expression inside your if() like this:

if(129.phoneNumber = null or 129.phoneNumber = "null"; 160.phone; 129.phoneNumber)

This way, the condition will work correctly, and the if function will return the right value based on whether the phone number is missing.

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