Introduction cfx_kmSuite
Programming Reference

cfx_kmSuite is a collection of cfx tags, each containing a related set of functions. It might be helpful to think of the tags as "objects" with the functions being "methods". Examples of cfx_kmSuite tags include cfx_kmFormat, which contains data formatting and validation functions, and cfx_kmString, which contains string manipulation functions.

There are more than 100 individual functions in cfx_kmSuite. Most of these functions have tag attributes specific to their operation. Documentation of the functions and attributes is organized in sections, according to the cfx tags which contain the functions.

A small set of attributes are supported by ALL cfx_kmSuite tags and functions. For efficiency, the attributes are not covered in the documentation of each individual function. It is important to understand these attributes and realize they are ALWAYS applicable, with no exceptions.

The general syntax for any cfx_kmSuite function call is as follows:

<cfx_kmWhatever  F=function  V=variable  SHOW  ...>
   
cfx_kmWhatever represents the name of the module containing the function. (e.g. cfx_kmCalendar)

ALL cfx_kmSuite tags support the following attributes:

    F=  The name of the specific FUNCTION being called. For example, <cfx_kmSystem F=GetTempDir> calls the GetTempDir function in the cfx_kmSystem module. This is the only attribute that is ALWAYS REQUIRED.
 
    V=  The name of a caller VARIABLE. If a name is supplied, the function will store it's output in the named variable. This is an optional attribute because you may not need to save the function output.

If you do NOT specify a variable name, the function output is automatically displayed in the web page. This is a handy simplification. If you only want to display the output, just call the function--no need for variables or any other programming.
 
    SHOW   As mentioned above, the V= attribute controls whether the function output is displayed immediately or stored in a variable. What if you want to display the output AND save it in a variable? Use V= to specify a variable name and include the SHOW attribute to force the automatic output display. Remember, you only need to use SHOW if you want to display AND save the function output.
 
    ...  Specific functions are likely to support other attributes, in addition to the three described here. Some examples are described below. For more information, refer to the specific module programming references.
 
      Due to the nature and limitations of CFX custom tags, they can basically do two* things: 1) write output to the browser page and 2) store values in Cold Fusion variables. If you want to do more processing with a cfx function value, you must save it to a variable and process that variable.

*OK, three things. CFX custom tags can also create queries, a capability which is useful in specialized situations.

In addition to their unique functions, each cfx_kmSuite tag supports the following informational routines:

    F=Help  The Help function returns a quick-reference document describing every function supported by the given cfx_kmSuite tag.
 
    F=Version  The Version function returns the version of the given cfx_kmSuite tag. The version is specified as a date string, in the format yyyy.mm.dd, e.g."2000.09.18". Special versions and updates may contain an additional designation following the day number.
 
Tag Examples


<cfx_kmFormat F=Help>
This calls the Help function in the cfx_kmFormat module. A reference help text, covering the functions implemented in cfx_kmFormat, is displayed in the web page.
<cfx_kmQuery F=Version V="verQuery">
This calls the Version function in the cfx_kmQuery module. The tag version is stored in a Cold Fusion variable called "verQuery". Because a variable name is specified and the SHOW attribute is not present, the version value is not displayed in the web page.
<cfx_kmCalendar F=BasicMonth DATE="11/22/1963">
This tag calls the BasicMonth function in the cfx_kmCalendar module. The output is a calendar for November, 1963, formatted as an HTML table. Because no V= variable name is specified for the function output, the calendar is automatically displayed in the web page.
<cfx_kmMisc F=SpellDollars V="Amt" VALUE=123.45>
This calls the SpellDollars function in the cfx_kmMisc module. The string value, "One Hundred Twenty Three Dollars and 45 Cents" is stored in the variable Amt. Because a variable name was specified and the SHOW attribute was not present, the function output is not displayed in the web page.
<cfx_kmString F=ProperCase V="cAddr" SHOW VALUE="#custAddress#">
This calls the ProperCase function in the cfx_kmString module. The text value in the variable custAddress is converted to proper case (i.e. capitalized), the result is stored in the variable cAddr AND the result is displayed in the web page (as per the SHOW attribute).