Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple IIF not executing the Else statement

Status
Not open for further replies.

redeemasp

Programmer
Jun 1, 2004
63
GB
I use:

IIF ({ORC_get_O07MarketingLead.Description} = 'Marketing Lead', "Yes", "No")

When variable is other than Marketing Lead, the second part of the statement (else) does not perform.

So I get either Yes, or Blank (instead of No). Any ideas?

Thanks

Redeem
 
I don't think the iif function (in CR) works well with nulls. Try using:

if isnull({ORC_get_O07MarketingLead.Description}) or
{ORC_get_O07MarketingLead.Description} <> "Marketing Lead" then "No" else "Yes"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top