>I have some fields in a table. I want to check this bunch of fields to see if they are all EMPTY(). What's the best way to do it? Maybe I need to use EMPTY() instead? But I was comparing one after another and it was not very efficient. Thanks in advance.
>
>IF INLIST(EMPTY(something here?),ADDLINE1,ADDLINE2,CITYADDR, ;
>STATEADDR,ZIP,HPHONE,WPHONE,WEXT,CPHONE,PAGER,FPHONE)
>...(condition if .T.)
>...
>ELSE
>...(condition if .F.)
>ENDIF
Are they all character data? If so:
IF LEN(ALLTRIM(AddLine1 + AddLine2 + ...)) = 0
Obviously, this tells you ony if all of them are empty, not which ones.
If this during data validation? You might be able to take advantage of GETFLDSTATE() instead. GETFLDSTATE(-1,cAlias) returns a string with a single character for each field in the record telling you if the field content was changed; the first position indicates the deletion status, and the remaining positions correspond to the fields in field number order.