Avoiding empty fields!

I’m having an issue with empty fields messing up my flows. I have an AI which I’m prompting with “DO NOT RETURN AN EMPTY FIELD” to no avail, and am struggling to get the text manipulation node to replace any empty fields with “unknown” or “error”

This doesn’t seem to work:

Hey @thomasA - You can use the following to identify empty inputs with regex: /^\s*$/ - the regex pattern needs to be wrapped in / with any flags at the end, or the Find and Replace node won’t recognize it as a valid regex pattern.

You can also use the Filter node with the Is not Empty condition.

This topic was automatically closed after 3 days. New replies are no longer allowed.