OK, first steps to getting this to work are going well. I can run the 
search, set a query object, and do a CFDUMP and my expected results are 
there. The only problem I'm having is setting my keyCOUNT variable.

<cfset req.keyCOUNT = ListValueCountNoCase(results.narrative,req.srch, " ")>

The above always returns zero, regardless of what I do.

OK, "results.narrative" isn't really a list, but a SQL "text" cell. But, 
I figured I could treat it as a large list with spaces as delimiters. 
Guess not.

So, what do I need to do to count the number of times "req.srch" appears 
in "#results.narrative#"

<cfset q_atty = queryNew("atty_id, first_name, last_name, keyCOUNT")>

<cfset n = #results.recordcount# >

<cfloop query="results" startrow="1" endrow="#n#">

   <cfset req.keyCOUNT = 
ListValueCountNoCase(results.narrative,req.srch, " ")>

   <cfset queryAddRow(q_atty)>

   <cfset querySetCell(q_atty, "atty_id", results.atty_id, 
results.currentROW)>
   <cfset querySetCell(q_atty, "first_name", results.first_name, 
results.currentROW)>
   <cfset querySetCell(q_atty, "last_name", results.last_name, 
results.currentROW)>
   <cfset querySetCell(q_atty, "keycount", req.keyCOUNT, 
results.currentROW)>

</cfloop>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307886
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to