Yes I thought that also
Im pretty sure cf string append is & don’t use it anymore so could be wrong <cfset delim = chr(35) & chr(35) /> <cfset mycommand= delim & "reboot" & delim & url.id <http://url.id> & delim & "1212" & delim /> Should give you what you want, note 2 #’s in delim Regards Dale Fraser From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of Blair McKenzie Sent: Monday, 2 March 2015 11:21 AM To: Unname Subject: Re: [cfaussie] Creating A String With ## values in coldfusion Yeah, I do that for line breaks. Either way, you get rid of the eye-crossing stream of #. Blair On Mon, Mar 2, 2015 at 11:10 AM, Barry Beattie <barry.beat...@gmail.com <mailto:barry.beat...@gmail.com> > wrote: personally, I'd much prefer setting the # as a variable from the chr(x) function over replacing one string with another. Easily missed and there are ~ popping up unexpectedly... my 2c (from memory, YMMV) <cfset delim = chr(35) /> /** # as delim **/ <cfset mycommand= delim + "reboot" + delim + delim + url.id <http://url.id> + delim + "1212"> On Mon, Mar 2, 2015 at 9:53 AM, Blair McKenzie <shi...@gmail.com <mailto:shi...@gmail.com> > wrote: Another alternative - create the output with a substitute delimiter, like ~, and then use replace to change them to hashes. Blair On Mon, Mar 2, 2015 at 10:41 AM, Dale Fraser <d...@fraser.id.au <mailto:d...@fraser.id.au> > wrote: I would break it apart <cfset mycommand=”##reboot###url.id###1212## <http://url.id#%23%231212%23%23> ”> To <cfset mycommand = “##reboot##” & url.id <http://url.id> & “##1212##” /> Regards Dale Fraser From: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> [mailto:cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> ] On Behalf Of Jack Traynor Sent: Monday, 2 March 2015 8:54 AM To: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> Subject: Re: [cfaussie] Creating A String With ## values in coldfusion I copy + pasted the code from your email into a CF10 test page and added /?id=100 to the URL and it worked as you expected it to. Do you have an example of an ID? What error are you getting? Regards, Jack On Mon, Mar 2, 2015 at 2:22 AM, M@ Bourke <m.electronic.at.sym...@gmail.com <mailto:m.electronic.at.sym...@gmail.com> > wrote: how about something like <cfset mycommand=”##reboot##"+ <http://url.id/#%23%231212%23%23> url.id +"##1212##”> On Sun, Mar 1, 2015 at 3:16 PM, <rai...@ozemail.com.au <mailto:rai...@ozemail.com.au> > wrote: Hi This has been causing me grief so some assistance would be appreciated I need to be able to create a ColdFusion variable that contains the following text “#reboot#45454#1212#” The values of “#reboot#” and “#1212#” are constant however the value of 45454 is dynamically generated from the url parameter passed to the page So the actual CF code should look something like: <cfset mycommand=”##reboot###url.id###1212## <http://url.id#%23%231212%23%23> ”> So that the ## output a single # No matter what I try I cannot get it to work, even tried using a evaluate(url.id <http://url.id> ) but that gave no joy either NB: TrackingCentral is now a registered product & services provider for the National Disability Insurance Scheme, under the category of Assisted Technology Regards Claude Raiola Director TrackingCentral Pty. Ltd Free Call 1300 255 990 -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com <mailto:cfaussie+unsubscr...@googlegroups.com> . To post to this group, send email to cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> . Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com. To post to this group, send email to cfaussie@googlegroups.com. Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/d/optout.