ColdFusion Notes



Missing Tags

Tags you would expect CF to have, but it doesn't:
TagWork Around
<CFDELETE> You must use CFQUERY with an explicit Delete

Lists, Using

Creating a List <CFSET VarName="one,two,three">
Size #ListLen([listvar])#
First Element #ListFirst([listvar])#
Last Element #ListLast([listvar])#
Added to the end #ListAppend( [listvar], "[newval]")#
The Whole List #[listvar]#
Get Element #ListGetAt( [listvar], [position] {, delimiters})#

Variables

Plain Variable <CFSET VarName="Value">
List <CFSET VarName="one,two,three">

Functions

#DollarFormat([Amount])#
#IsDefined("[variable]")#
#NOW()# The present time
#URLEncodedFormat(Trim([string]))# Use these 2 to format a value for passing as part of a URL

Tags

CFQUERY <CFQUERY
NAME="[NameToReferenceThisBy]"
DATASOURCE="[Database Name Registered in CF]"
>

SELECT [DatabaseColumn]{,[DatabaseColumn]}...
FROM [DatabaseName]
{ORDER BY [DatabaseColumn]{,[DatabaseColumn]}...}

</CFQUERY>
CFOUTPUT <CFOUTPUT
{QUERY="[CFQUERYs NameToReferenceThisBy]"
 {GROUP="[CFQUERYs ORDER BYs first DatabaseColumn]}
}
>

{
 <CFOUTPUT>
 </CFOUTPUT>
}

</CFOUTPUT>
CFSET <CFSET [VarName]="[value]">
CFIF <CFIF [Expression]>
{<CFELSEIF [Expression]>}
{<CFELSE>}
</CFIF>
CFCASE <CFSWITCH EXPRESSION="#[variable]#">
 {<CFCASE VALUE="[value for this case]">
  </CFCASE>}
 {<CFDEFAULTCASE>
  </CFDEFAULTCASE>}
</CFSWITCH>

Remote Debugging Path

In Debug->Development Mapping

To Use an rds source, set the 3 entries to something like:

rds://BaseFred/C:\Inetpub/wwwroot/
C:\Inetpub/wwwroot/
http://127.0.0.1/

Problems With ColdFusion Studio 5


Browse Window Does not show executed CF output