Formula Error

Gordon Hughes
Gordon Hughes used Ask the Experts™
on
I have a formula
if (isnull ({MembersDetails.Medical Conditions})) then 'None recorded' else ({MembersDetails.Medical Conditions})

But is does not work
The field in the database is completely blank, so is the problem that I am saying 'isnull'
How do I correct this?
Gordon
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Analyst Assistant
Commented:
Gordon

It might be an empty string rather then Null, you could check for that, as well as Null, like this.

if isnull ({MembersDetails.Medical Conditions}) or {MembersDetails.Medical Conditions} = ""  then 'None recorded' else ({MembersDetails.Medical Conditions})

Open in new window

Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
which syntax? Basic or Crystal?
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
It could be the problem.  Is the field NULL or is it the empty string ''
NULL is the absence of a value. The Empty string is a defined value

DO you have the option DEFAULT FOR NULL checked in the formula editor?

Building on the above comment it may need a minor correction depending on what is in the field

If isnull ({MembersDetails.Medical Conditions}) or 
            Trim({MembersDetails.Medical Conditions}) = ""  then 
                    'None recorded' 
 Else 
       {MembersDetails.Medical Conditions}

Open in new window


mlmcc
Gordon HughesDirector

Author

Commented:
All sorted
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial