I think it should be & and not +.
From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of rai...@ozemail.com.au Sent: Monday, 2 March 2015 10:44 AM To: cfaussie@googlegroups.com Subject: SPAM-LOW: RE: [cfaussie] Creating A String With ## values in coldfusion <cfset delim = chr(35) /> <cfset mycommand= delim + 'reboot' + delim + delim + url.imei + delim + '1212'> Generates the error The value # cannot be converted to a number. The error occurred in C:/home/svr.trackingcentral.com.au/wwwroot/mobile_apps/test.cfm: line 11 9 : <body> 10 : <cfset delim = chr(35) /> 11 : <cfset mycommand= delim + 'reboot' + delim + delim + url.imei + delim + '1212'> 12 : 13 : <cfoutput>#mycommand#</cfoutput> 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 From: cfaussie@googlegroups.com <mailto:cfaussie@googlegroups.com> [mailto:cfaussie@googlegroups.com] On Behalf Of Barry Beattie Sent: Monday, 2 March 2015 10:11 AM To: cfaussie Subject: Re: [cfaussie] Creating A String With ## values in coldfusion 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.