Representing null in Server Action Condition

I have the following server action step:

null

Is the the correct way to represent the value null?

By null, do you mean an empty string / empty form input?

Well it is the result of a database query for my contacts table with id=0, which doesn’t exist… so it is whatever is returned by that request!

I’m guessing null, but I don’t know how that is translated when applied to a text input. All I know is that the text input for id doesn’t display anything! :slight_smile:

But you are not using the query result directly in the server action? Instead you are using a POST var, which is a form input. The expression will be:

{{$_POST.id == 0 || $_POST.id=''}}

or

{{$_POST.id == 0 || !$_POST.id}}

whatever is easier for you :slight_smile:
Both will be true if your form input is empty OR equal to 0.

Great, thanks @Teodor!