How do you do X in CFScript?

This post is more than 2 years old.

With ColdFusion 9 allowing for script-based CFCs, a lot more people (I assume!) are making use of CFScript. Adobe expanded support for many (but not yet all) of ColdFusion tags into script. You may, however, forget exactly how things are implemented. For example, the cfdump tag is writeDump in CFScript. If you want a handy reference to this, you need to use the ColdFusion Developer's Guide, not the CFML Reference. In the chapter/section, "The CFML Programming Language / Extending ColdFusion Pages with CFML Scripting" you will find the following table:

What is supported in CFScript

It gives you a nice tag to script comparison to help you remember how things are implemented.

For the items implemented as CFCs, you can then look at Script Functions Implemented as CFCs, which oddly goes back to the CFML Reference.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Pete Freitag posted on 3/17/2010 at 8:45 PM

That is Very handy ray!

I just want to point out that I also have a CFScript cheatsheet: it has not yet been updated for CF9 though, but is handy for some of the core stuff like loops, switch case, etc.

Comment 2 by Raymond Camden posted on 3/17/2010 at 8:47 PM

Well then update it darnit! ;) Fyi, a coworker today showed me code where his case statement looked like so:


Surprisingly that worked just fine.

Comment 3 by Pete Freitag posted on 3/17/2010 at 9:01 PM

Cool, didn't know you could do that either...

Yeah I'll get on that update ;-)

Comment 4 by Lola LB posted on 3/17/2010 at 9:03 PM

Thanks! This will help me get on with the program and learn to embrace cfscript.

Comment 5 by Richard posted on 3/18/2010 at 1:03 PM

I hated Cfscript...little did I know!