If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

IIF () or If Then Else?

Hello,

I have three fields Create Date, Consult Date, and Diag Date. I want to create a formula field that will test if first, if Diag Date is populated, then the value of the formula field will be the value of Diag Date, If Diag Date is null the it will see if Consult Date is populated. If so then the value will be the same as Consult Date. If Consult Date is null the the value will be that of Create Date. I have tried both an IIF() function and an If - Then - Else statement to achieve this but I only get the value of Diag Date when I run the report. The IIF function is: IIf(Not IsNull({@Diag Date}),{@Diag Date},IIf(Not IsNull({@Consult Date}),{@Consult Date},{@Create Date}))
and the If Then Else statements is: If IsNull({@Diag Date}) then
{@Diag Date} else if
IsNull({@Consult Date}) then
{@Consult Date} else
{@Create Date}