Re: Including multiple variables within a database response

2011-04-02 Thread John M Bliss

replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME, Scott,
all)

On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
myscottwilli...@yahoo.comwrote:


 Wow! This works great!

 What if there are multiple things to replace within the variable? For
 example,
 you have a string like:


 Hi DECISIONMAKER. This is MYNAME.

 I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
 with
 Scott.

  Scott Williams



 - Original Message 
 From: Brian Cain bcc9...@gmail.com
 To: cf-talk cf-talk@houseoffusion.com
 Sent: Fri, April 1, 2011 8:25:31 AM
 Subject: Re: Including a variable within a database response


 Easiest way is to use the Replace function built in to CF.


 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html


 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
 If

 you have multiple instances of the replacement value be sure to specify the
 All scope.  You may also want to look at the ReplaceNoCase function.

 Brian Cain

 On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 
  Hi all --
 
  I have a script that draws some text from a database, and I would like to
  embed
  a person's name within the text.
 
  For example, the database field contains this text:
 
  Hi #name#. How's it going?
 
  I would like the #name# to be replaced with a previously defined variable
  name.
 
  Can ColdFusion do this? If so, how?
 
  Scott
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343489
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Including multiple variables within a database response

2011-04-02 Thread Scott Williams

LOL -- I was afraid of that! It reminds me of the portrait of Stephen Colbert 
standing in front of a portrait of Stephen Colbert standing in front of a 
portrait of Stephen Colbert ad infinitum.

 Scott 



- Original Message 
From: John M Bliss bliss.j...@gmail.com
To: cf-talk cf-talk@houseoffusion.com
Sent: Sat, April 2, 2011 9:05:28 AM
Subject: Re: Including multiple variables within a database response


replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME, Scott,
all)

On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
myscottwilli...@yahoo.comwrote:


 Wow! This works great!

 What if there are multiple things to replace within the variable? For
 example,
 you have a string like:


 Hi DECISIONMAKER. This is MYNAME.

 I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
 with
 Scott.

  Scott Williams



 - Original Message 
 From: Brian Cain bcc9...@gmail.com
 To: cf-talk cf-talk@houseoffusion.com
 Sent: Fri, April 1, 2011 8:25:31 AM
 Subject: Re: Including a variable within a database response


 Easiest way is to use the Replace function built in to CF.


http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l


 
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l
 If

 you have multiple instances of the replacement value be sure to specify the
 All scope.  You may also want to look at the ReplaceNoCase function.

 Brian Cain

 On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 
  Hi all --
 
  I have a script that draws some text from a database, and I would like to
  embed
  a person's name within the text.
 
  For example, the database field contains this text:
 
  Hi #name#. How's it going?
 
  I would like the #name# to be replaced with a previously defined variable
  name.
 
  Can ColdFusion do this? If so, how?
 
  Scott
 
 



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343491
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Including multiple variables within a database response

2011-04-02 Thread Jason Fisher

Can use replaceList() instead.

replaceList(mystring, DECISIONMAKER,MYNAME, Bob,Scott)



On 4/2/2011 12:57 PM, Scott Williams wrote:
 LOL -- I was afraid of that! It reminds me of the portrait of Stephen Colbert
 standing in front of a portrait of Stephen Colbert standing in front of a
 portrait of Stephen Colbert ad infinitum.

   Scott



 - Original Message 
 From: John M Blissbliss.j...@gmail.com
 To: cf-talkcf-talk@houseoffusion.com
 Sent: Sat, April 2, 2011 9:05:28 AM
 Subject: Re: Including multiple variables within a database response


 replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME, Scott,
 all)

 On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 Wow! This works great!

 What if there are multiple things to replace within the variable? For
 example,
 you have a string like:


 Hi DECISIONMAKER. This is MYNAME.

 I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
 with
 Scott.

   Scott Williams



 - Original Message 
 From: Brian Cainbcc9...@gmail.com
 To: cf-talkcf-talk@houseoffusion.com
 Sent: Fri, April 1, 2011 8:25:31 AM
 Subject: Re: Including a variable within a database response


 Easiest way is to use the Replace function built in to CF.


 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
 l


 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
 l
 If
 you have multiple instances of the replacement value be sure to specify the
 All scope.  You may also want to look at the ReplaceNoCase function.

 Brian Cain

 On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 Hi all --

 I have a script that draws some text from a database, and I would like to
 embed
 a person's name within the text.

 For example, the database field contains this text:

 Hi #name#. How's it going?

 I would like the #name# to be replaced with a previously defined variable
 name.

 Can ColdFusion do this? If so, how?

 Scott







 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343493
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Including multiple variables within a database response

2011-04-02 Thread Russ Michaels

Scott did you read the article I linked to? This does explain how to do
exactly what you need and a lot more.

On Sat, Apr 2, 2011 at 6:21 PM, Jason Fisher ja...@wanax.com wrote:


 Can use replaceList() instead.

 replaceList(mystring, DECISIONMAKER,MYNAME, Bob,Scott)



 On 4/2/2011 12:57 PM, Scott Williams wrote:
  LOL -- I was afraid of that! It reminds me of the portrait of Stephen
 Colbert
  standing in front of a portrait of Stephen Colbert standing in front of a
  portrait of Stephen Colbert ad infinitum.
 
Scott
 
 
 
  - Original Message 
  From: John M Blissbliss.j...@gmail.com
  To: cf-talkcf-talk@houseoffusion.com
  Sent: Sat, April 2, 2011 9:05:28 AM
  Subject: Re: Including multiple variables within a database response
 
 
  replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME,
 Scott,
  all)
 
  On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
  myscottwilli...@yahoo.comwrote:
 
  Wow! This works great!
 
  What if there are multiple things to replace within the variable? For
  example,
  you have a string like:
 
 
  Hi DECISIONMAKER. This is MYNAME.
 
  I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
  with
  Scott.
 
Scott Williams
 
 
 
  - Original Message 
  From: Brian Cainbcc9...@gmail.com
  To: cf-talkcf-talk@houseoffusion.com
  Sent: Fri, April 1, 2011 8:25:31 AM
  Subject: Re: Including a variable within a database response
 
 
  Easiest way is to use the Replace function built in to CF.
 
 
 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
  l
 
 
  
 
 http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
  l
  If
  you have multiple instances of the replacement value be sure to specify
 the
  All scope.  You may also want to look at the ReplaceNoCase function.
 
  Brian Cain
 
  On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
  myscottwilli...@yahoo.comwrote:
 
  Hi all --
 
  I have a script that draws some text from a database, and I would like
 to
  embed
  a person's name within the text.
 
  For example, the database field contains this text:
 
  Hi #name#. How's it going?
 
  I would like the #name# to be replaced with a previously defined
 variable
  name.
 
  Can ColdFusion do this? If so, how?
 
  Scott
 
 
 
 
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343496
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Including multiple variables within a database response

2011-04-02 Thread Scott Williams

Sorry, but no. There was too much extraneous stuff that didn't help me. Simple 
minds need simple answers.

 Scott 


- Original Message 
From: Russ Michaels r...@michaels.me.uk
To: cf-talk cf-talk@houseoffusion.com
Sent: Sat, April 2, 2011 12:41:32 PM
Subject: Re: Including multiple variables within a database response


Scott did you read the article I linked to? This does explain how to do
exactly what you need and a lot more.

On Sat, Apr 2, 2011 at 6:21 PM, Jason Fisher ja...@wanax.com wrote:


 Can use replaceList() instead.

 replaceList(mystring, DECISIONMAKER,MYNAME, Bob,Scott)



 On 4/2/2011 12:57 PM, Scott Williams wrote:
  LOL -- I was afraid of that! It reminds me of the portrait of Stephen
 Colbert
  standing in front of a portrait of Stephen Colbert standing in front of a
  portrait of Stephen Colbert ad infinitum.
 
Scott
 
 
 
  - Original Message 
  From: John M Blissbliss.j...@gmail.com
  To: cf-talkcf-talk@houseoffusion.com
  Sent: Sat, April 2, 2011 9:05:28 AM
  Subject: Re: Including multiple variables within a database response
 
 
  replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME,
 Scott,
  all)
 
  On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
  myscottwilli...@yahoo.comwrote:
 
  Wow! This works great!
 
  What if there are multiple things to replace within the variable? For
  example,
  you have a string like:
 
 
  Hi DECISIONMAKER. This is MYNAME.
 
  I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
  with
  Scott.
 
Scott Williams
 
 
 
  - Original Message 
  From: Brian Cainbcc9...@gmail.com
  To: cf-talkcf-talk@houseoffusion.com
  Sent: Fri, April 1, 2011 8:25:31 AM
  Subject: Re: Including a variable within a database response
 
 
  Easiest way is to use the Replace function built in to CF.
 
 
 
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l
  l
 
 
  
 
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l
  l
  If
  you have multiple instances of the replacement value be sure to specify
 the
  All scope.  You may also want to look at the ReplaceNoCase function.
 
  Brian Cain
 
  On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
  myscottwilli...@yahoo.comwrote:
 
  Hi all --
 
  I have a script that draws some text from a database, and I would like
 to
  embed
  a person's name within the text.
 
  For example, the database field contains this text:
 
  Hi #name#. How's it going?
 
  I would like the #name# to be replaced with a previously defined
 variable
  name.
 
  Can ColdFusion do this? If so, how?
 
  Scott
 
 
 
 
 
 
 
 

 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343505
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Including multiple variables within a database response

2011-04-02 Thread Scott Williams

Ding Ding Ding Ding! We have a winner! Thanks Jason!

 Scott 



- Original Message 
From: Jason Fisher ja...@wanax.com
To: cf-talk cf-talk@houseoffusion.com
Sent: Sat, April 2, 2011 10:21:16 AM
Subject: Re: Including multiple variables within a database response


Can use replaceList() instead.

replaceList(mystring, DECISIONMAKER,MYNAME, Bob,Scott)



On 4/2/2011 12:57 PM, Scott Williams wrote:
 LOL -- I was afraid of that! It reminds me of the portrait of Stephen Colbert
 standing in front of a portrait of Stephen Colbert standing in front of a
 portrait of Stephen Colbert ad infinitum.

   Scott



 - Original Message 
 From: John M Blissbliss.j...@gmail.com
 To: cf-talkcf-talk@houseoffusion.com
 Sent: Sat, April 2, 2011 9:05:28 AM
 Subject: Re: Including multiple variables within a database response


 replace(replace(mystring, DECISIONMAKER, Bob, all), MYNAME, Scott,
 all)

 On Sat, Apr 2, 2011 at 11:00 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 Wow! This works great!

 What if there are multiple things to replace within the variable? For
 example,
 you have a string like:


 Hi DECISIONMAKER. This is MYNAME.

 I want to replace DECISIONMAKER with Bob and I want to replace MYNAME
 with
 Scott.

   Scott Williams



 - Original Message 
 From: Brian Cainbcc9...@gmail.com
 To: cf-talkcf-talk@houseoffusion.com
 Sent: Fri, April 1, 2011 8:25:31 AM
 Subject: Re: Including a variable within a database response


 Easiest way is to use the Replace function built in to CF.


http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l
 l


 
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_32.html
l
 l
 If
 you have multiple instances of the replacement value be sure to specify the
 All scope.  You may also want to look at the ReplaceNoCase function.

 Brian Cain

 On Fri, Apr 1, 2011 at 10:22 AM, Scott Williams
 myscottwilli...@yahoo.comwrote:

 Hi all --

 I have a script that draws some text from a database, and I would like to
 embed
 a person's name within the text.

 For example, the database field contains this text:

 Hi #name#. How's it going?

 I would like the #name# to be replaced with a previously defined variable
 name.

 Can ColdFusion do this? If so, how?

 Scott







 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343506
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm