IsEmpty function problem
I am importing data which contains numerous fields. One of those fields (call it "field A") has records which contain either a number or no content at all. I am running an auto-enter calc on the records in that field, and the results of that calc end up in a new field (call it "field B"). If the records have data I just want that data moved to field B. If the imported records are empty I want to put an arbitrary numer is field B. So I have a simple "IF" function for field B:
Field B = IF (IsEmpty (field A); 42; field A)
/*where "42" is the arbitrary number I throw in if the field for a given record is empty*/
The script itself is working just fine. The problem is this: if I import data that doesn't even have that field, the "IsEmpty" function apparently considers that to still be an empty record and puts a "42" in field B. I was assuming that this function would know the difference between an empty record and a non-existant one. But I guess not.
So how do I change my script so that the "IsEmpty" function will only work if the imported data actually has the field in question?