<CFSEARCH> Tag - ColdFusion


>> Return to ColdFusion Tag Index

The <CFSEARCH> tag allows you ...



  <CFSEARCH> Comments from Macromedia LiveDocsLiveDocs Comments - coldfusion - 6 - CFML_Reference - Tags-pt3.htm
It appears that there is a new behavior for cfmx 6.1. Under CF5,
<cfsearch name = "qrySearchHits"
collection = "#request.verity.colname#"
criteria = "#attributes.text#"
maxrows = "#wkMaxRows#"
startrow = "#attributes.StartRow#"
>
will return hits #26-50 if wkMaxRows==25 and attributes.StartRow==26. However, under cfmx 6.1, <cfsearch> will return zero hits with these values. Instead, one must use wkMaxRows==50 and attributes.StartRow==26 in order to get hits #26-50.

When migrating my code I changed the above to the following:
<cfsearch name = "qrySearchHits"
collection = "#request.verity.colname#"
criteria = "#attributes.text#"
maxrows = "#Evaluate(attributes.StartRow + wkMaxRows - 1)#"
startrow = "#attributes.StartRow#"
>

The documentation for "maxrows" would seem to indicate that this behavior is not intended for cfmx 6.1, and, indeed, a better name for "maxrows" under this behavior would be "lastrow".

LiveDocs Comments - coldfusion - 6 - CFML_Reference - Tags-pt3.htm
Regarding the above statement:

New in ColdFusion MX: ColdFusion can create collections, index query results and delete index keys.

The ability to create collections isn't new in CFMX. What's meant by this? Certainly, CFSEARCH cannot create collections. As explained elsewhere on the page, the only way to create a collection in CFMX is with CFCOLLECTION or the CF Admin, and neither of those is new.

As for being able to "index query results" and "delete index keys", in case anyone was wondering (I had someone ask me), this is the ability to take the results of a CFSEARCH and index it with CFINDEX. If you try it in CF5, it fails, whereas in CFMX it does now seem to work.



[Top]


Recommended Books

[Top]

Web Sites

[Top]

Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved