cancel
Showing results for 
Search instead for 
Did you mean: 

If Statement returns incomplete data

Former Member
0 Kudos

Hi,

I have a table workorder with these fields wonum, eqnum, eqnum1 , here is the sample data

wo001,null,null

wo002,FCU-01,null

wo003,null,Urinal

Then I have a formula named Equipment

IF (IsNull ({workorder.eqnum}) AND isnull ({workorder.eqnum1}) OR {workorder.eqnum} = "" AND {workorder.eqnum1} = "" OR

IsNull ({workorder.eqnum}) AND {workorder.eqnum1} = "" OR IsNull ({workorder.eqnum1}) AND {workorder.eqnum} = "" )THEN

"FIXME"

ELSE IF (not isnull ({workorder.eqnum1}) OR {workorder.eqnum1} = "") THEN

{workorder.eqnum1}

ELSE IF (not isnull ({workorder.eqnum}) or {workorder.eqnum} = "") then

{workorder.eqnum}

when I run the report this is what I get on @Equipment

wo001 - FIXME

wo002 -

wo003 - URINAL

on wo002 I'm supposed to get FCU-01 but i do not get anything and I can figure what is wrong, could anybody please help?

Thanks in advance!

Martin

Accepted Solutions (1)

Accepted Solutions (1)

former_member230846
Contributor
0 Kudos

Hi Martin,

I would suggest testing each of the conditions separately to see if the criteria is met. However, this could be as simple as enabling the "Convert NULL Field to Default" under File|Report Options.

Regards,

Wallie

Former Member
0 Kudos

Hi Wallie,

Thank you for your response.

When I run each condition separately I get the correct result and the "Convert NULL Field to Default" is Checked.

Thanks!

Martin

Answers (0)