Hi Dave
Actually that doesn't work because checkvariables yields the specific illegal
character that has been found. What I want is the list variable. something like
<cfset "error" &#list# = "this is the error message.">
to yield
<cfset erroremailaddress="this is the error message">
but the &#list# doesn't work or any variation I have thought of.
Thanks
Rob
On 8 Mar 2012 at 8:41, Phillips, Dave wrote:
>
> Rob,
>
> I'm having a hard time understanding exactly what you are looking
> for, but what I *think* you are asking is how to do this:
>
> <cfset "error#checkVariables#" = "this is the error message.">
>
> I think that will work. If not, there is an old deprecated function
> that I believe is still active in CF 9 called SetVariable. You can
> do this:
>
> <cfset setVariable("error" & checkVariables,"this is the error
> message.")>
>
> I believe either of those should do what you want to do.
>
> Dave
>
> -----Original Message-----
> From: Rob Voyle [mailto:[email protected]]
> Sent: Thursday, March 08, 2012 8:27 AM
> To: cf-newbie
> Subject: cfloop list
>
>
> Hi folks
>
> I have a cfloop to check erros in a forms entry:
>
> <cfloop index="checkVariables"
> list="#emailAddress#,
> #nameTitle#,
> #nameFirst#,
> #nameLast#,
> #address#,
> #phone#"
> delimiters = ",">
>
> <cfif REFind('[_~##^*+={}/|\\\[\]]', checkVariables)>
> <cfset badCharacter="yes">
> <cfset errorData=1>
> <cfset errorDataMessage="<h3>You have an illegal character """ &
> checkvariables & " "" in one of the fields</h3>">
> </cfif>
>
> <cfloop>
>
> What I want to be able to do is create a specific error message such
> as:
>
> error & listitem to yield
>
> errorEmailAddress
> errornameTitle
> errornamefirst etc.
>
> How do I create the specific error variable name?
>
> Thanks
> Rob
> Robert J. Voyle, Psy.D.
> Director, Clergy Leadership Institute
> For Coaching and Training in Appreciative Inquiry
> Author: Restoring Hope: Appreciative Strategies
> to Resolve Grief and Resentment
> http://www.appreciativeway.com/
> 503-647-2378 or 503-647-2382
>
>
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~|
> Order the Adobe Coldfusion Anthology now!
> http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=
> houseoffusion
> Archive:
> http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:
> 5810
> Subscription:
> http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
> Unsubscribe:
> http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5811
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm