FM 15 pro
Not sure why this is not working. Created a global variable to setfield to erase its content "". See attached pic. The script debugger says missing field.
You are using Set Field on a variable. Use Set Variable instead.
references (FMP 15):
I'm setting a variable to get the field name so I can delete "" contents from the field with another script. Check out the attached pics. Thanks.
You are looking for the script Step : Set Field By Name
That way you'll be able to specify the name of the field with your Global Variable.
That is an available step in FMP 15, as well:
Set Field By Name
Resolution is already posted.
Your script doesn't have specified field, so set active field with boolean value "whether the variable is empty or not". The error means there is no active field at the time.
user19752 wrote:Your script doesn't have specified field, so set active field with boolean value "whether the variable is empty or not". The error means there is no active field at the time.
That is needlessly confusing the issue. The Set Field script step does not require the field to be active; it doesn't even require it to be present on the layout. But it does require it to be named, hence the solution lies in using Set Field By Name instead.
I agree it may be confusing, but I think learning why a written script doesn't work as expected is not needless.In addition, I don't use set field without specifying field usually. It would be useful for some "generic" script, but I can't recall when I used it.
And now I noticed that the variable have only field name, "Set Field by Name" require fully qualified field name (table::field).
And the script name is "Clear Ref Pic 2", it contains field name to clear. Then the issue could be using needless variable there??
Retrieving data ...