Than you Paul and Steven. I looked over both your suggestions and it worked well for me. I also extended my coding knowledge a bit. I like this forum!
RO HWW -----Original Message----- From: "Paul Alkema" <[email protected]> Sent: Monday, March 22, 2010 12:12pm To: "cf-talk" <[email protected]> Subject: RE: Does not contain dilema First off, as a general rule I would put the variable first, then the string. So you have cfif "united States" contains country. I would try cfif country contains "united states". Secondly.. You need to var your variables. If country is a form variable refer to it as form.country... not just country. This could really mess you up down the road, plus it's just a bad practice. Some something like... <cfif form.country contains "United States" and form.state contains "IL" and not form.inType contains "K-12" /> Also, what I do in instances where I'm using multiple IF arguments and I'm trying to find which one is causing my IF statement to fail, is I remove the "<cif" at the beginning and the closing IF bracket. Then I wrap an cfoutput tag around the IF statement and put pound signs around each statement. This should output YES or NO if the statement is passing or not. This is a good way to diagnose which For instance this should tell you exactly which IF argument is causing your IF statement to fail. <cfoutput> #"United States" Contains Country# and #"K-12" does not contain intype# and #(State is "IL") or (State is "IA")# </cfoutput> <cfabort /> Regards, Paul Alkema http://www.alkemadesigns.com -----Original Message----- From: Orlini, Robert [mailto:[email protected]] Sent: Monday, March 22, 2010 11:51 AM To: cf-talk Subject: Does not contain dilema I have a form with a field call "intype" which I need to filter and NOT send an email if the form does contain a certain list of states, but does not contain the value "k-12" for intype. The cfif I have that does not seem to work is: <CFIF "United States" Contains Country and "K-12" does not contain intype and "IL" Contains State or "IA" Contains State>. I've tried, but it still sends the email which I don't want: <CFIF "United States" Contains Country and "K-12" does not contain intype and (State is "IL") or (State is "IA")> Any easier way to do this please? Thanks. RO HWW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332097 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

