Item9991: ActionSearch does not correctly resolve variables
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Performing an
ActionSearch (
ActionSearchPlugin) with a parameter incuding a variable which again is dependant from the current values of the Seach, the variable is not computed correctly:
Example1:
%ACTIONSEARCH{.... format=%FORMFIELD{"Client" topic="$actionsearchvar"}%}%
Nothing is returned. If i hard-code the topic everything works fine of course.
Example2:
%ACTIONSEARCH{.... format=%IF{" '$actionsearchvar' = 'VALUE'" then"THEN" else="ELSE"}%}%
"ELSE" is always returned, independent of the actual value of actionsearchvar.
Is this a know issue? Is the a solution? I think the
Item8232 is basicly the same question but old and never answered.
--
EnrikGuenter - 10 Nov 2010
Tested: disable all plugins. No change.
--
EnrikGuenter - 24 Nov 2010
A few issues here. Parameters have to be quoted, and if you want to delay expansion you have to use $percnt and $quot (or \") in the parameter value. For example
%ACTIONSEARCH{.... format="$percntIF{\" '$actionsearchvar' = 'VALUE'\" then=\"THEN\" else=\"ELSE\"}$percnt"}%
Also, I would recommend using the (new)
nohtml
parameter to stop HTML from being auto-generated for field values.
No action.
--
CrawfordCurrie - 28 Jan 2011