May 12, 200421 yr I am migrating a database written in FMP v3 that I did not write to FMP v7. I have found that the author uses tests like: If ( <condition> ; 1 ; GetAsNumber("") ) ...in number fields that act like boolean flags. Does anyone have any idea why he would use GetAsNumber("") to mean false instead of the number zero? I'm not even clear on what GetAsNumber("") returns-- I think it sets the field to empty/no value. Thanks for your input.
May 12, 200421 yr The developer may have wanted to use Count( ) on the field, or some other function where 0 would interfere with the result. TextToNum( ) or GetAsNumber( ) is often used when converting text values. It never seems to be necessary when setting null though, whereas TextToDate("") is vital unless you want a question mark in a date field.
Create an account or sign in to comment