Re: cfif contains

2010-10-17 Thread Phillip Vector
1. No need for # inside the cfif. :) 2. You shouldn't need to trim it if you use a contains. 3. You set CPU to a single value of AMD. Therefore, cpu.description doesn't exist anymore. On Sun, Oct 17, 2010 at 2:03 PM, Rick Sanders c...@webenergy.ca wrote: How can I do a cfif contains? Error

RE: cfif contains

2010-10-17 Thread Rick Sanders
Subject: Re: cfif contains 1. No need for # inside the cfif. :) 2. You shouldn't need to trim it if you use a contains. 3. You set CPU to a single value of AMD. Therefore, cpu.description doesn't exist anymore. On Sun, Oct 17, 2010 at 2:03 PM, Rick Sanders c...@webenergy.ca wrote: How can I do

Re: CFIF within CFmail?

2010-02-23 Thread Orlini, Robert
Thankls Aaron. RO -Original Message- From: Aaron Neff w...@itisdesign.com Sent: Tuesday, February 23, 2010 12:05am To: cf-talk cf-talk@houseoffusion.com Subject: Re: CFIF within CFmail? Hi Robert, Just adding another option.. cfmail to=t...@domain.com from=f...@domain.com cc

RE: CFIF within CFmail?

2010-02-22 Thread Ben Forta
Try this: cfset arguments=StructNew() cfset arguments.from=FORM.email cfif form.intype=K-12 cfset arguments.cc=te...@test2.com /cfif cfmail attributeCollection=arguments ... /cfmail -Original Message- From: Orlini, Robert [mailto:rorl...@hwwilson.com] Sent: Monday, February 22,

Re: CFIF within CFmail?

2010-02-22 Thread Jake Churchill
first of all, your cfif syntax is incorrect... Here's what I'd do: cfparam name=ccEmail default= / cfif form.inttype eq K-12 cfset ccEmail = te...@test2.com / /cfif cfmail from=#FORM.email# to=t...@test.com cc=#ccEmail# Subject=New Jersey !--- EMAIL CONTENTS HERE --- /cfmail This is

Re: CFIF within CFmail?

2010-02-22 Thread I. Addoum.
that will not work ... you should have your CFIF before the cfmail tag cfif form.intype EQ K-12CFSET V_cc=te...@test2.com CFELSE CFSET V_cc= /Cfif CFMAIL from=#FORM.email# To=t...@test.com cc=#V_cc#Subject=New Jersey From: Orlini, Robert

RE: CFIF within CFmail?

2010-02-22 Thread Eric Nicholas Sweeney
I usually do this Before the CfMail... cfparam name=variable.CCEmail Default= cfif form.intype EQ K-12 cfset variable.CCEmail = te...@test2.com /cfif CFMAIL from=#FORM.email# To=t...@test.com cc=#variable.CCEmail# Subject=New Jersey Your Mail /cfmail Hope that Helps! - Nick

RE: CFIF within CFmail?

2010-02-22 Thread LRS Scout
cfif form.intype is K-12 cfset myCC = t...@test2.com cfelse cfset myCC = /cfif cfmail to=t...@test.com cc=#myCC# subject=New Jersey /cfmail Couple of things here. 1. Try not to use tags inside tags. It's hard to read. 2. You don't need pound signs (#) inside CF tags

RE: CFIF within CFmail?

2010-02-22 Thread LRS Scout
Eww sexy -Original Message- From: Ben Forta [mailto:b...@forta.com] Sent: Monday, February 22, 2010 10:02 AM To: cf-talk Subject: RE: CFIF within CFmail? Try this: cfset arguments=StructNew() cfset arguments.from=FORM.email cfif form.intype=K-12 cfset arguments.cc=te...@test2

RE: CFIF within CFmail?

2010-02-22 Thread Dave Phillips
/Cfif Subject=New Jersey -Original Message- From: I. Addoum. [mailto:sol_xp...@yahoo.com] Sent: Monday, February 22, 2010 9:03 AM To: cf-talk Subject: Re: CFIF within CFmail? that will not work ... you should have your CFIF before the cfmail tag cfif form.intype EQ K-12CFSET V_cc=te

RE: CFIF within CFmail?

2010-02-22 Thread Dave Phillips
Phillips [mailto:experiencedcfdevelo...@gmail.com] Sent: Monday, February 22, 2010 9:23 AM To: 'cf-talk@houseoffusion.com' Subject: RE: CFIF within CFmail? Actually, that's not true. You can easily put CFIF inside of your cfmail tag. I've done it for 12+ years! Your only problem was that you used

Re: CFIF within CFmail?

2010-02-22 Thread Maureen
Should be: cfif #form.intype# eq K-12cc=te...@test2.com/Cfif On Mon, Feb 22, 2010 at 6:57 AM, Orlini, Robert rorl...@hwwilson.com wrote: cfif #form.intype#=K-12cc=te...@test2.com/Cfif It generates an error. Is there a better way to do this?

Re: CFIF within CFmail?

2010-02-22 Thread Claude Schnéegans
You can easily put CFIF inside of your cfmail tag. You can have CF statements between the opening CFMAIL tag and the closing /CFMAIL, or inside an HTML tag, but never embedded inside another CF tag. ~| Want to reach the

Re: CFIF within CFmail?

2010-02-22 Thread Dave Watts
I'm trying to include a cfif within a cfmail. If a form element is K-12, then I want to add a cc to the cfmail part. Here is what I have in part: CFMAIL from=#FORM.email# To=t...@test.com cfif #form.intype#=K-12cc=te...@test2.com/Cfif Subject=New Jersey It generates an error. Is there

Re: CFIF within CFmail - resolved

2010-02-22 Thread Orlini, Robert
Thank you all for the coding advice and code tidbits. It works now and I have a better idea of what to do and not do with CFMail. I know why I like this list! RO HWW ~| Want to reach the ColdFusion community with something

Re: CFIF within CFmail?

2010-02-22 Thread Aaron Neff
Hi Robert, Just adding another option.. cfmail to=t...@domain.com from=f...@domain.com cc=#((FORM.inputType is 'K-12') ? 'c...@domain.com' : '')# subject=subjectmessage/cfmail Thanks!, -Aaron I'm trying to include a cfif within a cfmail. If a form element is K-12, then I want to add a cc

Re: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Alan Rother
You spelled elseif wrong cfesleif mid(current_route_id,1,2) IS 02 should be cfelseif On Thu, Jul 23, 2009 at 10:55 AM, Michael Stevens bigm...@bigmikes.orgwrote: Forgive me for what will be a really dumb question. I'm not real experienced with CF and it's been a long time since I've had

RE: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Michael Stevens
Wow... I knew it would be dumb but I think that's a record low for me... Thanks! -Original Message- From: Alan Rother [mailto:alan.rot...@gmail.com] Sent: Thursday, July 23, 2009 11:02 AM To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token 'apos;'... You spelled elseif

Re: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Alan Rother
Nah.. Thats not soo bad.. In fact I had to read it several times before I saw it. =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Want to reach the

Re: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Charlie Griefer
think that's a record low for me... Thanks! -Original Message- From: Alan Rother [mailto:alan.rot...@gmail.com] Sent: Thursday, July 23, 2009 11:02 AM To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token 'apos;'... You spelled elseif wrong cfesleif mid(current_route_id

Re: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Jason Fisher
Just because I can't help myself, you may find the whole thing more readable, and easier to maintain with a CFSWITCH statement in place of all those ELSE's. Also probably more performant with only parsing the string once or twice per loop. cfoutput query=Recordset1 cfset route =

RE: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Michael Stevens
To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token 'apos;'... Michael - I spent a good 5 minutes looking at it trying to figure out if you mixed up single and double quotes or something. Sometimes... well, forest. trees. all that. :) On Thu, Jul 23, 2009 at 11:26 AM, Michael

RE: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread Michael Stevens
. -Original Message- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, July 23, 2009 11:30 AM To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token 'apos;'... Just because I can't help myself, you may find the whole thing more readable, and easier to maintain with a CFSWITCH

Re: cfif, cfifelse problem... Invalid token 'apos;'...

2009-07-23 Thread James Holmes
- From: Jason Fisher [mailto:ja...@wanax.com] Sent: Thursday, July 23, 2009 11:30 AM To: cf-talk Subject: Re: cfif, cfifelse problem... Invalid token 'apos;'... Just because I can't help myself, you may find the whole thing more readable, and easier to maintain with a CFSWITCH statement

Re: cfif help

2009-07-13 Thread Francois Levesque
You can try something like this: cfif listFind( 1,2, type ) a href= ... /a /cfif or, a more verbose way, but it can end up being much longer if you add possibilities: cfif type EQ 1 OR type EQ 2 a href= ... /a /cfif Francois Levesque http://blog.critical-web.com/ On Mon, Jul 13, 2009 at

Re: cfif help

2009-07-13 Thread Steven Sprouse
You can try something like this: cfif listFind( 1,2, type ) a href= ... /a /cfif or, a more verbose way, but it can end up being much longer if you add possibilities: cfif type EQ 1 OR type EQ 2 a href= ... /a /cfif Francois Levesque http://blog.critical-web.com/ So what if I already

Re: cfif help

2009-07-13 Thread Francois Levesque
Juste replace type by schoolTypeID cfif listFind( 1,2, schoolTypeID ) a href= ... /a /cfif or, a more verbose way, but it can end up being much longer if you add possibilities: cfif schoolTypeID EQ 1 OR schoolTypeID EQ 2 a href= ... /a /cfif Francois Levesque http://blog.critical-web.com/

Re: cfif help

2009-07-13 Thread Steven Sprouse
Juste replace type by schoolTypeID Francois Levesque http://blog.critical-web.com/ Got it. Thanks so much for your help! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of

RE: [Spam?] Re: CFIF Not Working As Expected

2009-06-04 Thread Steve LaBadie
18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu -Original Message- From: Peter Boughton [mailto:bought...@gmail.com] Sent: Wednesday, June 03, 2009 5:30 PM To: cf-talk Subject: [Spam?] Re: CFIF Not Working As Expected Why do you suggest using the StructKeyExists

Re: CFIF Not Working As Expected

2009-06-03 Thread Peter Boughton
Try this: cfif StructKeyExists(Form,'Name') AND Len(trim(Form.Name)) cfoutputpYou have requested CMS access for /cfoutput cfif StructKeyExists(Form,'RequestName') AND Len(trim(Form.RequestName)) cfoutputstrong#Form.Name#/strong and

RE: CFIF Not Working As Expected

2009-06-03 Thread Steve LaBadie
University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu -Original Message- From: Peter Boughton [mailto:bought...@gmail.com] Sent: Wednesday, June 03, 2009 2:00 PM To: cf-talk Subject: Re: CFIF Not Working As Expected Try

Re: CFIF Not Working As Expected

2009-06-03 Thread Peter Boughton
Why do you suggest using the StructKeyExists? Because it is the most efficient way to check if the Form scope contains the Name field. Do you see a problem in doing it this? cfif form.name NEQ AND form.requestname NEQ ... The main problem is that there is nothing to check/enforce that

RE: CFIF Pissing me off

2007-08-22 Thread Jayesh Viradiya
Hi Bruce, I don't see any issue with CFIF. I have used your code to test it and it works find on IE and Firefox both. Check out the below code by executing in browser. Thanks Regards, Jayesh Viradiya Adobe CF Team cfparam name=GetScheduleInfoRet.Shift default= form name=frm input type=text

RE: CFIF Pissing me off

2007-08-22 Thread Loathe
HTML is an xml subset. -Original Message- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 10:53 AM To: CF-Talk Subject: Re: CFIF Pissing me off is selected=selected so bad? Bad, I don't know, but for the least, useless and stupid. why

Re: CFIF Pissing me off

2007-08-22 Thread Aaron Rouse
I do XHTML compliant code because I am finding more and more places are making it part of their requirements when I do work on a project for them. I just find it easier to do all the time than just selectively when it is needed. It is not like it takes much, if any, more effort to do it over not

Re: CFIF Pissing me off

2007-08-22 Thread Claude Schneegans
is selected=selected so bad? Bad, I don't know, but for the least, useless and stupid. why rile against a movement towards XML standards? Because HTML is HTML, XML is XML. If one needs to use XML, fine, but so far, all browsers are able to read HTML, so I don't see why I should bother make

Re: CFIF Pissing me off

2007-08-22 Thread Dominic Watson
is selected=selected so bad? Bad, I don't know, but for the least, useless and stupid. Useless if you don't want your HTML as XML granted, clearly essential if you do. Stupid? Yes, the people who created XML are clearly below average IQ. why rile against a movement towards XML standards?

RE: CFIF Pissing me off

2007-08-22 Thread owner
with strict xhtml standards...selected does have a value of selected. According to the standard, ever attribute has a value. Eric Original Message Subject: Re: CFIF Pissing me off From: Claude Schneegans [EMAIL PROTECTED] Date: Tue, August 21, 2007 9:53 am To: CF-Talk cf

Re: CFIF Pissing me off

2007-08-22 Thread Claude Schneegans
HTML is an xml subset. Absolutely not. Both HTML and XML are norms compliant to SGML and, with an adequat DTD, XML can be used to englobe HTML, but HTML was introduced prior to XML, and so far, HTML is THE standard for the web, XML is not. And even so, why use a superset when a subset is

Re: CFIF Pissing me off

2007-08-22 Thread Claude Schneegans
I am finding more and more places are making it part of their requirements when I do work on a project for them. Now, this is a good reason, even if customers don't even know why they want id XHTML compliant ;-) -- ___ REUSE CODE! Use custom tags; See

Re: CFIF Pissing me off

2007-08-22 Thread Aaron Rouse
They know why(or at least why enough), the state is telling them it has to be along with some other requirements. Well at least the clients in the medical and education fields. On 8/22/07, Claude Schneegans [EMAIL PROTECTED] wrote: I am finding more and more places are making it part of their

RE: CFIF Pissing me off

2007-08-22 Thread Loathe
blah. -Original Message- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 12:14 PM To: CF-Talk Subject: Re: CFIF Pissing me off HTML is an xml subset. Absolutely not. Both HTML and XML are norms compliant to SGML and, with an adequat DTD, XML

RE: CFIF Pissing me off

2007-08-22 Thread Dave Watts
is selected=selected so bad? Bad, I don't know, but for the least, useless and stupid. It's neither useless nor stupid. Boolean attributes in HTML aren't consistent with how HTML attributes are written - as name-value pairs. Consistency has an obvious value. If one needs to use XML, fine,

Re: CFIF Pissing me off

2007-08-22 Thread Dominic Watson
XHTML provides several advantages over HTML, such as a clearer separation between formatting and content. Add to that portability! This argument reminds of a news article I read yesterday on a Jamaican who proudly defied the evacuation of his town, due to the incoming hurricane, with

Re: CFIF Pissing me off

2007-08-21 Thread Crow T. Robot
I think it is selected=true, or you can just use option value=B selected. Not sure if that is your problem, but that's what jumped out at me. Also, be careful when you test in FF, as it tends to cache your form selections even upon a ctrl-refresh. That has gotten me quite a few times. I usually

Re: CFIF Pissing me off

2007-08-21 Thread Gert Franz
You might just use the word selected instead of selected=selected. In both cases HTML finds the keyword selected so it takes the second one. Nothing to do with CFIF... :-) Greetings / Grüsse Gert Franz Customer Care Railo Technologies GmbH [EMAIL PROTECTED] www.railo.ch Join our Mailing List

Re: CFIF Pissing me off

2007-08-21 Thread Crow T. Robot
Also, what does the page source look like? You can tell which block fired by looking there, and determine if it is really a CF issue or just an html issue. On 8/21/07, Crow T. Robot [EMAIL PROTECTED] wrote: I think it is selected=true, or you can just use option value=B selected. Not sure

Re: CFIF Pissing me off

2007-08-21 Thread Claude Schneegans
The problem is not with CFIF but with your HTML. The SELECTED attribute in a SELECT takes no value: option value=B selected -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address:

Re: CFIF Pissing me off

2007-08-21 Thread Mik Muller
BTW, Lots of code for just two options. Try this: select name=Shift cfloop list=Breakfast,Lunch,Dinner,Supper,Midnight Snack,Elevenses,Afternoon Snack,Purge index=ii option value=#left(ii,1)# cfif GetScheduleInfoRet.Shift eq left(ii,1)selected=selected/cfif#ii#/option /cfloop /select At

Re: CFIF Pissing me off

2007-08-21 Thread Dan Blickensderfer
Bruce, It seems a lot of work... I have always used the following for selecting an option. select name=Shift option value=B cfif (GetScheduleInfoRet.Shift) IS Bselected/cfifBreakfast/option option value=L cfif (GetScheduleInfoRet.Shift) IS Lselected/cfifLunch/option /select Thanks, Dan

Re: CFIF Pissing me off

2007-08-21 Thread Mik Muller
At 12:51 PM 8/21/2007, Crow T. Robot wrote: Also, be careful when you test in FF, as it tends to cache your form selections even upon a ctrl-refresh. That has gotten me quite a few times. I usually test these things in IE just to be safe. I noticed that too. I just click to another page and

RE: CFIF Pissing me off

2007-08-21 Thread Bruce Sorge
That is exactly what was happening. Using FF to view the work and I forgot that FF does this. Bruce -Original Message- From: Mik Muller Sent: Tuesday, August 21, 2007 10:04 AM To: CF-Talk Subject: Re: CFIF Pissing me off At 12:51 PM 8/21/2007, Crow T. Robot wrote: Also, be careful when

Re: CFIF Pissing me off

2007-08-21 Thread Charlie Griefer
On 8/21/07, Claude Schneegans [EMAIL PROTECTED] wrote: The problem is not with CFIF but with your HTML. The SELECTED attribute in a SELECT takes no value: option value=B selected it does in XHTML. selected=selected is valid XHTML. the shorthand selected is not. -- Charlie Griefer

RE: CFIF Pissing me off

2007-08-21 Thread Dave Watts
Yeah, that is the problem with using DWCS3. It installs shit like Selected=Selected. Look at the top line of your HTML document. If it's an XHTML document, then you're getting the right shit. If you choose another DOCTYPE, Dreamweaver will generate valid HTML for that DOCTYPE as well. When

RE: CFIF Pissing me off

2007-08-21 Thread Bruce Sorge
, August 21, 2007 9:54 AM To: CF-Talk Subject: Re: CFIF Pissing me off The problem is not with CFIF but with your HTML. The SELECTED attribute in a SELECT takes no value: option value=B selected ~| ColdFusion 8 - Build next

RE: CFIF Pissing me off

2007-08-21 Thread Paul Vernon
The problem is not with CFIF but with your HTML. The SELECTED attribute in a SELECT takes no value: option value=B selected It does with XHTML. Just like checkboxes have to be checked=checked :) Paul ~| Download the

RE: CFIF Pissing me off

2007-08-21 Thread Bruce Sorge
Got-cha!. Thanks. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 10:33 AM To: CF-Talk Subject: RE: CFIF Pissing me off Yeah, that is the problem with using DWCS3. It installs shit like Selected=Selected. Look at the top line of your HTML

Re: CFIF Pissing me off

2007-08-21 Thread Claude Schneegans
it does in XHTML. selected=selected is valid XHTML. the shorthand selected is not. One more reason I don't use XHTML ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address:

Re: CFIF Pissing me off

2007-08-21 Thread Dominic Watson
One more reason I don't use XHTML ;-) I don't see why that is a reason... is selected=selected so bad? With so much wrong with the HTML format, or more precisely with browsers reading it, why rile against a movement towards XML standards? I realise this is off the question - just reading all

Re: cfif in xsl

2007-06-06 Thread Barney Boisvert
XSL has xsl:if and xsl:choose tags that can be used for conditional logic. cheers, barneyb On 6/6/07, Dave Francis [EMAIL PROTECTED] wrote: I use xmlTransform to turn a taxonomy into a tree of html checkboxes. For later editing, I need to set those checkboxes which were previously

RE: CFIF and suppressing a register button if event_date is in the past

2007-05-24 Thread Adkins, Randy
Take a look at the DateDiff function. You can use that to accomplish your task. -Original Message- From: Elaine Mingus [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 12:03 PM To: CF-Talk Subject: CFIF and suppressing a register button if event_date is in the past I have an

Re: CFIF and suppressing a register button if event_date is in the past

2007-05-24 Thread Josh Nathanson
cfif DateCompare(eventdate,Now(),d) is -1 suppress button /cfif -- Josh - Original Message - From: Elaine Mingus [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, May 24, 2007 9:03 AM Subject: CFIF and suppressing a register button if event_date is in the past I

Re: CFIF - Not to show

2007-04-04 Thread Charlie Griefer
1) just curious... why not use cfif URL.showAll GTE 25 and omit the cfelse rather than have an empty condition? 2) is URL.showAll a numeric value or a boolean? at one point you set it as YES... but in your conditional you're evaluating whether or not it's less than 25? On 4/4/07, Steve LaBadie

RE: CFIF - Not to show

2007-04-04 Thread Steve LaBadie
04, 2007 3:55 PM To: CF-Talk Subject: Re: CFIF - Not to show 1) just curious... why not use cfif URL.showAll GTE 25 and omit the cfelse rather than have an empty condition? 2) is URL.showAll a numeric value or a boolean? at one point you set it as YES... but in your conditional you're evaluating

Re: cfif vs cfswitch

2007-01-30 Thread Jochem van Dieten
Matt Robertson wrote: http://webapper.net/index.cfm?fuseaction=Fuseblog.ShowCommentsArticleID=20060727042244 I am cringing at all of the code I have running under switches under the supposition that its more efficient code. Hell... thats what a case statement is supposed to be in the

RE: cfif vs cfswitch

2007-01-30 Thread Richard Kroll
of a loop, the performance difference was virtually undetectable. HTH, Rich Kroll -Original Message- From: Doug Brown [mailto:[EMAIL PROTECTED] Sent: Monday, January 29, 2007 6:18 PM To: CF-Talk Subject: Re: cfif vs cfswitch Still waiting to hear if this was involved with CFMX7. I

Re: cfif vs cfswitch

2007-01-30 Thread Scott Weikert
Does this cfswitch vs cfif performance difference apply to similarly coded stuff within cfscript areas, considering the syntax is slightly different? I'm assuming the same issues apply, but figured it was worth asking. --Scott

Re: cfif vs cfswitch

2007-01-30 Thread Matt Robertson
On 1/30/07, Jochem van Dieten [EMAIL PROTECTED] wrote: Matt Robertson wrote: Do you just take somebodies word for it or have you benchmarked it yourself in your own environment? One thing I lack is testing platforms, so the answer is the former, with respect to the people saying it was faster

Re: cfif vs cfswitch

2007-01-30 Thread Matt Robertson
On 1/30/07, Richard Kroll [EMAIL PROTECTED] wrote: We noticed that when the cfswitch was outside of a loop, the performance difference was virtually undetectable. Good point. The performance difference on a single operation could well be acceptable, if still suboptimal.

Re: cfif vs cfswitch

2007-01-30 Thread Teddy Payne
I agree with Jochem's suggestion of using cfswitch for numeric or perhaps single character searches. CF offers short circuit evaluation that increases the speed of boolean decisions. Whenever you need more than one cfif or cfelseif, you need to really evaluate which condition is the most likely

RE: cfif vs cfswitch

2007-01-30 Thread Richard Kroll
I agree with Jochem's suggestion of using cfswitch for numeric or perhaps single character searches. The problem as noted in the link Jochem provided is that when using cfswitch, CF under the hood attempts a toDouble(), which if it is numeric hums happily along. If you pass in any type of

Re: cfif vs cfswitch

2007-01-29 Thread Charlie Griefer
On 1/29/07, Cutter (CFRelated) [EMAIL PROTECTED] wrote: Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited for switch/case statements, which I implemented in cfscript. When my boss saw this he said that

Re: cfif vs cfswitch

2007-01-29 Thread RobG
Cutter (CFRelated) wrote: Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited for switch/case statements, which I implemented in cfscript. When my boss saw this he said that there were issues with

Re: cfif vs cfswitch

2007-01-29 Thread Jerry Johnson
New to me, too. On 1/29/07, Cutter (CFRelated) [EMAIL PROTECTED] wrote: Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited for switch/case statements, which I implemented in cfscript. When my boss saw

Re: cfif vs cfswitch

2007-01-29 Thread Jochem van Dieten
Cutter (CFRelated) wrote: Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited for switch/case statements, which I implemented in cfscript. When my boss saw this he said that there were issues with

Re: cfif vs cfswitch

2007-01-29 Thread Josh Nathanson
What issues could there be? It either works or it doesn't. It's not like CFDocument or something where there are a whole bunch of moving parts involved. He could be questioning the speed, but if anything I would imagine a cfswitch would be quicker than a bunch of cfif/cfelse statements,

Re: cfif vs cfswitch

2007-01-29 Thread Matt Robertson
just say yes to switch / case. I'm not aware of any issues but I'd be happy to learn something new today. -- [EMAIL PROTECTED] Janitor, The Robertson Team mysecretbase.com ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2

Re: cfif vs cfswitch

2007-01-29 Thread Josh Nathanson
As usual Jochem is the final word...very good to know that! Hopefully this will be addressed in CF8. - Original Message - From: Josh Nathanson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, January 29, 2007 2:05 PM Subject: Re: cfif vs cfswitch What issues

Re: cfif vs cfswitch

2007-01-29 Thread Matt Robertson
On 1/29/07, Josh Nathanson [EMAIL PROTECTED] wrote: As usual Jochem is the final word...very good to know that! Holy cow. Indeed. Thanks Jochem. I am cringing at all of the code I have running under switches under the supposition that its more efficient code. Hell... thats what a case

Re: cfif vs cfswitch

2007-01-29 Thread Doug Brown
Subject: Re: cfif vs cfswitch As usual Jochem is the final word...very good to know that! Hopefully this will be addressed in CF8. - Original Message - From: Josh Nathanson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, January 29, 2007 2:05 PM Subject: Re

Re: cfif vs cfswitch

2007-01-29 Thread Will Tomlinson
Ok, now I'd like to know how your boss knew this, and most of us didn't on the list! lol! Will ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs

RE: cfif vs cfswitch

2007-01-29 Thread Eric Roberts
Message- From: RobG [mailto:[EMAIL PROTECTED] Sent: Monday, 29 January 2007 15:57 To: CF-Talk Subject: Re: cfif vs cfswitch Cutter (CFRelated) wrote: Recently I rewrote one of the templates within our massive system. The template had two large cfif/cfelseif blocks that appeared better suited

Re: CFIF? Still not solved :(

2006-12-22 Thread Adrian
Something like this? cfif len(asking1) Insert asking 1 cfelseif(len(asking2)) Insert asking 2 cfelse Insert default /cfif On 22/12/06, Doug Brown [EMAIL PROTECTED] wrote: Arghhh.. as Captain Jack Sparrow would say. Anybody from the daytime crew wanna shot at this? I cannot

Re: CFIF? Still not solved :(

2006-12-22 Thread Doug Brown
Nope...asking1 will insert, but if asking2 is filled in instead, it will not insert. Doug B. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2

Re: CFIF? Still not solved :(

2006-12-22 Thread Doug Brown
Ok. I finally figured it out. I did it off the value of the radio buttons instead. Thanks for all the help, I think I just needed to sleep on it. cfif #Trim(arguments.price_option)# eq negotiable price = #arguments.asking1#, /cfif cfif #Trim(arguments.price_option)# eq fixed

Re: CFIF?

2006-12-22 Thread Claude Schneegans
How about this: CFPARAM name=ARGUMENTS.asking1 DEFAULT= CFPARAM name=ARGUMENTS.asking2 DEFAULT= CFSET price = listFirst(#ARGUMENTS.asking1#,#ARGUMENTS.asking1#,0) This way (and since CF ignores empty elements in lists), price will take the first non empty value, and 0 if both are empty. --

Re: CFIF?

2006-12-21 Thread John Cox
On 12/21/06, Doug Brown [EMAIL PROTECTED] wrote: I am having some troubles with an if statement and cannot seem to get it right. I have 2 text fields that hold the value of the price of items a user is selling, a user can fill in either one of the fields or none at all. If the user chooses

Re: CFIF?

2006-12-21 Thread Doug Brown
Ignore the NULL bye the way !!! Doug B. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2

Re: CFIF?

2006-12-21 Thread Dan Vega
if your searching for length or lack there of I prefer to use the len() method along with trimming any trailing or preceeding whitespace cfif len(trim(arguments.asking1) /cfiif On 12/21/06, John Cox [EMAIL PROTECTED] wrote: On 12/21/06, Doug Brown [EMAIL PROTECTED] wrote: I am having some

Re: CFIF?

2006-12-21 Thread Doug Brown
No, it is not the syntax that is the problem. What happens when the user does not enter any information into one of the two fields, then I need to be able to add a default value to the database. If a user enters an amount, then I need to place that info in the database. I hope this makes sense.

Re: CFIF?

2006-12-21 Thread Dan Vega
oops cfif len(trim(arguments.asking1)) /cfiif On 12/21/06, Dan Vega [EMAIL PROTECTED] wrote: if your searching for length or lack there of I prefer to use the len() method along with trimming any trailing or preceeding whitespace cfif len(trim(arguments.asking1) /cfiif On 12/21/06,

Re: CFIF?

2006-12-21 Thread Josh Nathanson
How 'bout cfif len(arguments.asking1) or len(arguments.asking2) cfif len(arguments.asking1) price = #arguments.asking1#, cfelse price = #arguments.asking2#, /cfif cfelse price = 0, /cfif - Original Message - From: Doug Brown [EMAIL PROTECTED] To: CF-Talk

Re: CFIF?

2006-12-21 Thread Dan Vega
You want to use the cfparam tag then to set default paramters. cfparam name=form.asking1 default= cfparam name=form.asking2 default= !--- sql insert --- Now when you do the insert it will either enter the default which in this case is an empty string (it can be anything) or if form.asking1 or

RE: CFIF?

2006-12-21 Thread Andrew Scott
cfif arguments.asking1 neq and arguments.asking2 eq price = #ARGUMENTS.asking1#, cfelseif arguments.asking1 eq and arguments.asking2 neq price = #ARGUMENTS.asking2#, cfelse price = NULL, /cfif Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au

Re: CFIF?

2006-12-21 Thread Doug Brown
Nope, wont work. Still the same result as before, 2nd field will not insert and default wont either. Doug B. ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2

Re: CFIF?

2006-12-21 Thread Doug Brown
Just to make this easy for everybody to understand. Here is what is happing, bye the way this is an update to the database. input type=radio value=Firminput type=text name=asking1 value= User enters price (firm price) OR input type=radio value=Negotiableinput type=text name=asking2 value= User

Re: CFIF?

2006-12-21 Thread Charlie Griefer
try a trim() as well. cfif len(trim(arguments.asking1)) GT 0 or len(trim(arguments.asking2)) GT 0 cfif len(trim(arguments.asking1)) GT 0 AND len(trim(arguments.asking2)) EQ 0 ... (etc) also, just out of curiousity... your first 2 radio buttons aren't named, so aren't passing

Re: CFIF?

2006-12-21 Thread Doug Brown
also, just out of curiousity... your first 2 radio buttons aren't named, so aren't passing anything to the action page, are they? just wondered what purpose they served. Actually they do, I just shortened a little so it was more readable. You might also just want to have one form field for

Re: CFIF Statement

2006-10-04 Thread Denny Valliant
On 10/3/06, Dave Watts [EMAIL PROTECTED] wrote: ... I don't think it matters that much one way or the other. I simply think we should be more careful about how we define best practices generally. Nothing /really/ matters. In the long run. ;-) I would think that best practice depends on how

Re: CFIF statement in query

2006-10-04 Thread Jim Wright
Aaron Rouse wrote: He wants it when the ucDescription contains that value and is not just equal to it or was that a typo in his CFIF? The case when then method may not work depending on what DB he is using and the version of it. Use a CASE statement in your SQL... cfquery

  1   2   3   4   5   6   >