[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Adding strings to cfset

Posted on 2006-03-26
4
Medium Priority
?
415 Views
Last Modified: 2013-12-24
I have:

<cfscript>
function MakeFormID()
{      
  bla...
}
</cfscript>

<cfset FormIDMade = #MakeFormID()#>

What I want is adding the word, 'Added', onto #MakeFormID()# so that #FormIDMade# can always have the suffix 'Added'.  i.e. if #MakeFormID()# is '68Xf3gw4', then it becomes '68Xf3gw4Added'; if '68H4h7Yv', then '68H4h7YvAdded'.
0
Comment
Question by:JohnLucania
  • 3
4 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 16297110
JohnLucania,

> <cfset FormIDMade = #MakeFormID()#>

<cfset FormIDMade = "#MakeFormID()#Added" />

Regards
Plucka
0
 
LVL 18

Expert Comment

by:Plucka
ID: 16297114
Or,

<cfset FormIDMade = #MakeFormID()#>
<cfset FormIDMade = FormIDMade & "Added">

Regards
Plucka
0
 
LVL 18

Accepted Solution

by:
Plucka earned 2000 total points
ID: 16297119
Plucka,

> <cfset FormIDMade = #MakeFormID()#>
> <cfset FormIDMade = FormIDMade & "Added">

Also,

You don't need #'s in function calls so you could without "'s so you could do

<cfset FormIDMade = MakeFormID() />
<cfset FormIDMade = FormIDMade & "Added" />

OR

<cfset FormIDMade = MakeFormID() & "Added" />


Lot's of possibilities.

Regards
Plucka
0
 

Author Comment

by:JohnLucania
ID: 16297128
Yup.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question