If you are trying to set the field in find mode with a value from a non-global field it will not work. You will need to set the value you want in a variable before you enter find mode. Then in find mode set the field with the variable.
Set Variable [$name]; value::fieldname
go to layout [mylayout]
enter find mode
set field [myfieldname; $name]
set field [mysecondfieldname; ""] - to find empty
its open to me during find in the layout, its closed during find in a script.
To find empty is an equal sign "=".
Set Field ( MyField ; "*" )