Need to replace all empty fields with NA
For my statistics program to work with my filemaker export, I can't have blank fields. Is there a way to replace all empty fields over the entire database with "NA"?
It depends when u want, and for which field u would like to perform such operations.
Case 1: for some fields, u want to place "NA" at the beginning, i.e. the time when u created that record.
for this, goto auto enter->calculation, and there u can put the required condition, like :put "NA";
Case 2: After inserting values in some field, u want to insert "NA" for all empty fields, then write a script, which'll check a field whether it's empty or not, if so then put there value "NA".
So how do I write that script? I need to do it for all fields. I might just do it in excel...
Someone else asked this same question and we came up with a way to do it with an auto-enter calculation you can copy and paste into the auto-enter calculation box for each such field where you want this.
Step 1: define a number field that auto-enter's a serial number, but define it to assign the number "on commit" instead of the default "on create" setting. I'll call this field ID for this example.
Then this auto-enter calculation will assign NA to the field only if it is empty at the time the record is committed:
If ( IsEmpty ( Self ) and ID ; "NA" ; Self )
Retrieving data ...