How to check if a text block's contents are empty?

I’d like to create a filter where I check if a text block’s contents = null, and then have that either trigger or not trigger something.

I saw the text compare block, but it outputs the contents of block B.

If you’re looking for if a list is empty, using a List Count and a Filter set to 0 should do it.

1 Like

So what I might want to do is send the test text to a list, and then filter the list?

Tried this, but the filter reads even an empty item in a list as an existing item :sweat_smile:

Oh you’re looking for Text, not a Text List.
You’re just trying to see if it equals “null”?

Text Compare works for that.

Just have the Text go into the “B” input, and set “A” inside of the behavior to “null”

1 Like

Trying this but it sends a 0 out from B no matter what I put into B
(it says “null” inside the text compare block, is that what you meant?)


maybe just don’t put anything in the text compare?

1 Like

You’re looking for a blank Text, or Text that contains “null”?

1 Like

If you’re looking for a blank Text, you could leave the Text Compare empty, but I haven’t used an empty Text Compare so maybe it would not output properly.
If that’s the case, you can use the Text Length behavior, which should output 0 if the Text is empty (Text Length outputs the number of characters inside the Text input)

2 Likes

Putting nothing into the text seems to work in terms of output, now I just need to figure out how to turn the outputs into a normal 1/0 trigger.

Ok, the two paths are being “activated” by receiving a zero! And zero works to activate a block. SOLVED

CleanShot 2023-02-06 at 21.54.43

3 Likes