I am assuming that this formula is in the select expert. So if you want to select all the records if a user does not enter a prompt then it normally (for me) looks something like this.
if hasValue({?Comments}) then {?Comments} = {Command.ZCOMMENTS}
the hasValue function is a boolean value, so it returns a true or false. Thus since you only want to filter when a value is entered, you would put the condition in when hasValue is true.