I am trying to use a string variable NoCommas as the search criteria for a CFSearch. Everytime I try it I get an invalid criteria error. I am using it in the following way
<cfif #Form.AllFields# is not "">
<cfset NoPeriods = "<cfoutput>#Replace(Form.AllFields,".","*", "all"
#</cfoutput>">
<cfoutput>#NoPeriods#</cfoutput>
<cfset NoCommas = "<cfoutput>#Replace(NoPeriods,",","\,", "all"
#</cfoutput>">
<cfoutput>#NoCommas#</cfoutput>
<CFSEARCH NAME= "GetAllFields"
COLLECTION= "HolmpsonSearchAll"
TYPE= "explicit"
CRITERIA= "#NoCommas#">
I don't understand why this should cause an error. Anyone know?
Thanks ahead of time
ECintern
<cfif #Form.AllFields# is not "">
<cfset NoPeriods = "<cfoutput>#Replace(Form.AllFields,".","*", "all"
<cfoutput>#NoPeriods#</cfoutput>
<cfset NoCommas = "<cfoutput>#Replace(NoPeriods,",","\,", "all"
<cfoutput>#NoCommas#</cfoutput>
<CFSEARCH NAME= "GetAllFields"
COLLECTION= "HolmpsonSearchAll"
TYPE= "explicit"
CRITERIA= "#NoCommas#">
I don't understand why this should cause an error. Anyone know?
Thanks ahead of time
ECintern