script to return true or false within a condition in a workflow

patricklatella
Mega Sage

I'm looking to use a "Wait for condition" step in a workflow to check a field on a record and if that field has an entry to return "true" (and allow the workflow to continue) and if empty to return "false" and have the workflow wait until that field is entered.   To do this I've got the following script...it's the part in bold that I think is incorrect...any help would be great, thanks!

var ext = workflow.scratchpad.ext;

gs.info('ext is ' + ext);   //this part is working, I'm seeing the entry in the log

if (!ext,'');{ // trying to say here that if the field is not empty to return true

answer = true;

}

else {

return false; //then this part too seems to have issues with the "else" statement

}