Requirement: for each X:
search for topics where a specified form field has value X
for each hit, print the mod date (without the time component).
We tried
%FOREACH{"release" in="8, 19"}%
---++ $release
$percntSEARCH{
topic="*Projects20.*" type="regex" nonoise="off"
search="META:FIELD.*?Release.*?value=\"$release\""
format="[$formfield(ProjectName) $percntCALC{$FORMATTIME($TIME($date),$day $mon $year)}$percnt "}$percnt
%NEXT{"release"}%
which doesn't work (as expected) because the CALC is evaluated too soon (before $date has a value).
But when we changed to
$dollarpercntCALC{ $FORMATTIME($TIME($date),$day $mon $year) }$dollarpercnt
which
should work (as documented), we see
$percntCALC{ $FORMATTIME($TIME($date),$day $mon $year) }$percnt
printed on the screen!
It turns out that
$percnt$nopCALC{$FORMATTIME($TIME($date),$day $mon $year)}$nop$percnt
works.
So we have a solution. But the failure of
$dollarpercnt
to work as documented feels like a bug.
--
TWiki:Main/VickiBrown - 06 May 2010
The bug is in an unfortunate spec of
TWiki:Plugins/ForEachPlugin: It expands
$pernct
anywhere within FOREACH and NEXT. You can lobby the maintainer of the ForEachPlugin to change the spec.
--
TWiki:Main.PeterThoeny - 08 May 2010