CFX_SEARCH Properties

Three properties are generated for each CFX_SEARCH query that provide information about a particular query: 

Using CFX_SEARCH properties 

You can use the three available CFX_SEARCH properties in much the same way you use other Cold Fusion system variables. For example, you can easily determine how many records were returned in a search with the following code: 

<CFOUTPUT>
   <P>Your search returned #queryname.RecordCount# records.</P>
</CFOUTPUT>

Other Examples 

This code presents a message to the user if no records were returned: 

<CFIF #cfuser.RecordCount# LTE 0>
   <CFOUTPUT>
      <P>Sorry no instances of "#Form.searchquery#" found.</P> 
   </CFOUTPUT>
<CFELSEIF #cfuser.RecordCount# GT 0>
   <CFOUTPUT QUERY="cfuser">
      <A HREF="#cfuser.url#">#cfuser.Title#</A><BR>
   </CFOUTPUT>
</CFIF>