Steve,
In general, @VARPARAM should be used when passing a variable into @CALLMETHOD – it binds the value atomically rather than allowing it to pass through the method parameter string parser. In this case, however, you’re passing in a subscript (cell of an array) which @VARPARAM doesn’t support, so you’ll need to copy it first: <@assign param @@request$ReturnSeoUrl[<@currow>,Cat_Name]> <@assign request$ReturnSeoUrl[<@currow>,Cat_Name] "<@callmethod request$Common 'PurgeSeoUrl(<@VARPARAM param>)'>" encoding=none> Robert From: Fogelson, Steve [mailto:[email protected]] Sent: Friday, April 05, 2013 1:47 PM To: [email protected] Subject: TeraScript-Talk: <@callmethod> I am having a little trouble with the <@callmethod> tag when my argument (in red) contains an apostrophe. The callmethod work fine when there are no apostrophes in the argument, but returns a blank or null when there is an apostrophe. <@assign request$ReturnSeoUrl[<@currow>,Cat_Name] "<@callmethod request$Common 'PurgeSeoUrl("<@var request$ReturnSeoUrl[<@currow>,Cat_Name]>")'>" encoding=none> I tried encoding with various options for the parameter, but it didn’t seem to help. Any ideas ? Here is the code for the method> <@assign method$TempName "<@getparam TempName>"> <@assign method$TempName "<@trim str='<@var method$TempName>'>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr='<@char 39>' replacestr=''>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr=' & ' replacestr='-'>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr=' / ' replacestr='-'>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr=' - ' replacestr='-'>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr='!' replacestr=''>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr='/' replacestr='-'>"> <@assign method$TempName "<@replace str='<@var method$TempName>' findstr=' ' replacestr='-'>"> <@assign method$TempName "<@lower str='<@var method$TempName>'>"> <@assign method$returnValue "<@var method$TempName>"> Thanks Steve Fogelson Internet Commerce Solutions _____ To unsubscribe from this list, please send an email to [email protected] <mailto:[email protected]> with "unsubscribe terascript-talk" in the body. ---------------------------------------- To unsubscribe from this list, please send an email to [email protected] with "unsubscribe terascript-talk" in the body.
