Mapping out the givens and the cases like that made me see the hole in the 
logic. I flipped the statement and it works in both cases: 

<cfif CGI.SCRIPT_NAME EQ '/page.cfm' OR (isDefined("url.ItemNumber") AND 
url.ItemNumber EQ 12345)>
show table 2
<cfelse>
show table 1
</cfif>

Issue resolved. Thanks for the help and for the new mode of thinking.

- Cameron



> Your right it is and thus the true clause would run.  Apparently it 
> was too early in the morning for me to be doing Boolean logic.  
> Corrected results below.
> 
.....
> IF (A AND B) OR C
.....
> IF (F AND F) OR F
.....
> IF F OR F
.....
> FALSE Clause Run
.....
> 
.....
> CASE 2
.....
> url.itemNumber = 12345
.....
> cgi.ScriptName = 'index.cfm'
.....
> 
.....
> IF (A ND B) OR C
.....
> IF (T AND F) OR T
.....
> IF F OR T
.....
> TRUE Clause Run
> 
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
 
> 
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
> 
.....
> -----Original Message-----
.....
> From: Dave Francis [mailto:[EMAIL PROTECTED]
.....
> Sent: Wednesday, May 25, 2005 8:57 AM
.....
> To: CF-Talk
.....
> Subject: RE: cfif with AND and OR statements
.....
> 
.....
> Isn't CASE 2, condition C True? ie. index.cfm NEQ page.cfm
> 
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message. 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207669
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to