On 9/26/05, Michel Deloux <[EMAIL PROTECTED]> wrote: > Hi all > > It's possible to call cfscript functions(application.cfm's living) > inside cfc component? I'm calling this function PrepareSearch and CF > returns an error: > > > Variable PrepareSearch is undefined. > > > The error occurred in D:\Inetpub\wwwroot\ghost\components\qryGhost.cfc: line > 40 > > 38 : <CFIF arguments.UserField is not ""> > 39 : > 40 : > #REReplaceNoCase(PrepareSearch("#arguments.UserField#","user"),";","'","All")# > > .... > > What's wrong? >
There's really no such thing as a cfscript-only tag. In your case, using a cfset will handle the job: <cfif arguments.UserField is not ""> <cfset myCleanedValue = REReplaceNoCase(PrepareSearch("#arguments.UserField#","user"),";","'","All") /> </cfif> Be sure to propertly var scope the myCleanedValue, but that'll get you going. Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219280 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54