FileMaker Pro 12 on Server 12 - OS X
I have a client who wants a button he can place on any layout between two fields (which could be in the same table or different tables or even a different file), then specify the source and target fieldnames as the script parameter, which will then copy the contents of source_field to target_field.
The client is trainable to understand the parameter must look like this:
& "¶" &
or even this:
I can then set variables for each field and the data they contain using variables:
Set Variable[$sourcefield ; getvalue(get(scriptparameter); 1)]
Set Variable[$sourcedata ; evaluate($sourcefield)]
Set Variable[$targetfield ; getvalue(get(scriptparameter); 2)]
Set Variable[$targetdata ; evaluate($targetfield)]
Then I can use Set Field By Name [$targetfield ; $sourcedata] to copy the data.
That works fine, but my question is this:
How do I make sure that the fieldnames he types into the script parameter are real fields and do not contain typos? In other words, confirm that $sourcefield and $targetfield are real.