dday (deceased) is not filled yet isempty(dday) returns 0
that should be 1. shouldn't it???
This should return 0 if field CONTACTS::dday has a value and 1 if CONTACTS::dday is empty OR an error is detected ( evaluation from an invalid context maybe?)
as you can see, the deceased field (it'scalled dday) is empty so it should return 1 (true)
You should check the field contents because its not empty.
There may be a space char, ¶, or another unprintable char in the field.
What does Length ( CONTACTS:dday) return?
What does CONTACTS:dday return in the watch window?
Is CONTACTS:dday set as date datatype?
IsEmpty(field ) will return 1 if empty, if not it will return 0.
Verify that your field is actually empty. It looks like from your post you are using a related table, your relationship maybe incorrect and returning the wrong record. Wrong child record may be link to incorrect parent record.
Not IsEmpty(field) will return 0 if empty, If not it will return 1.
the data came from VFP and is empty in VFP so I expect it to be empty in FM
how can I recify it?
searching for / / does not work (because the field is a date)
how can a date contain non numeric data??
What do you mean came from VFP?
Is it an ESS/Shadow table or did you import it into a native FM table called CONTACTS?
If CONTACTS:dday is native Fm and set to datatype text then it can contain anything
i imported from VFP into a fm table called contacts going through excel
what is the datatype of CONTACTS:dday
What does CONTACTS:dday contain in the watch window?
What is the relationship to CONTACTS:dday that is in scope when you refresh the calculation watch window?
There may be a space char, ¶, or another unprintable char in the field. it shows as / /
What does Length ( CONTACTS:dday) return? 4
What does CONTACTS:dday return in the watch window? / /
Is CONTACTS:dday set as date datatype? yes
the record is IN SCOPE
that probably means that ALL empty date came over as ' / / '
how can that be fixed ?
do I have to reexport and reimport all tables containing dates??
if all your data made it into FM from VFP i would script A "scrub" of the ddate field..
go to layout based on contacts
show all records
go to first record
if length ( ddays ) = 4 then set field ddays = ""
go to next record - exit at end
ref this thread for info on VFP imports.
I have a DB Written in Visual FoxPro. How do I import the Data into FMP?
thats a bug in my opinion. a date field should not contain invalid dates
how can I fix it if I can't check for an empty field? do I have to check from the length = 4
ok i ran a script checking for lenght=4 and resetting as ""
If you don't have validation explicitly turned on at the field level everything comes in on import garbage or not.
About validating data during import
learned something new. Thanks
but why would one choose NOT to validate data on import???
Because failure of validate on import can cause rejection of the entire record.
Can be like throwing out the baby with the bathwater kind of thing where it would be better to import the garbage and massage the data after import.
Its also an issue to define what caused the validation failure/import rejection if more than one field it set to validate.
FM does not report specifics of what field or fields failed validation on import only that x records of y total failed and were not imported.
I can concur that importing an Excel spread sheet brings a lot of 'junk' with it. In my case, I export an Excel report from Quickbooks. They go to a temporary table as new records.
If the Excel shows 300 rows, the FM table shows I imported 54000 records, and it takes about 45 seconds to import, clean, delete.
However, If in Excel, I draw a box around the records, copy and Paste Values only to a new sheet, then import, it does it instantly.
You might try using IsValid() rather than IsEmpty().
Retrieving data ...