crystal - if statement - If field 'a' is blank then look at field 'b'

7.6k views Asked by At

In Crystal 11, does the possibility exist to create a statement that would solve this issue I am faced with, using a formula field...

look at {fieldA} if there is a value listed, this should be the result but if {fieldA} is blank then refer to {fieldB} then use this as the result

Any advice or example statements for me to look at would be greatly appreciated

2

There are 2 answers

0
campagnolo_1 On

Something like this:

if {fieldA} = "" then {fieldB}
else {fieldA}
0
Odj fourth On

Assuming you want to treat NULL values as blanks, then this is very straightforward. Simply create a formula field with this:

if {fieldA} > "" then {fieldA}
else {fieldB}

HOWEVER!! For this to work for NULL values of{fieldA} you MUST toggle to "Default Values for NULL option.