You could set an auto-enter field option to enter N/A into all such fields when the record is created.
To count the N/A fields within a single record, this calculation would work:
(Field1 = "N/A") + (Field2 = "N/A") + (Field3 = "N/A") ...
I'd like the "N/A" to be entered into fields once I've finished data entry, and want to move on to the next record (effectively when I want to save the record). I don't really want to have to delete "N/A" in every box that hasn't been changed yet.
Ok, wanted you to consider that though, as it's much easier to set up. You can format the fields to select field contents on entry which can make deleting the N/A's easier. A script trigger that kicks in on field entry could also delete the field contents if they are "N/A" and an OnObjectExit trigger could put the "N/A" back upon exit if the field is empty.
Only other approach I can think of is to write a script that checks each of these fields in turn and enters "N/A" if they are empty. The OnRecordCommit layout trigger can be used to perform this script.
My last post kept nagging at me. I kept thinking there had to be a better way and this is an idea that finally percolated to the top of my brain...
Define a number field, Switch
Use this auto-enter calculation on each field where you wan "N/A" entered if the user does not enter a value:
If ( switch and isEmpty ( self ) ; "N/A" ; self )
Clear the "do not replace existing value" option.
Write a script:
Set Field [YourTable::Switch ; Get ( ScriptParameter ) ]
Set up the OnRecordLoad and OnRecordCommit triggers to perfom this script. Pass True as the parameter for OnRecordCommit and False as the script parameter for OnRecordLoad.
This switch field acts as a triggering field to make sure that N/A is entered into a record only after the user has had the opportunity to enter a value first.