Question
%CALC{ "$T( address )" }% of
SpreadSheetPlugin does not seem to support Variable Interpolation. We need to be able to total minutes spent in each task type.
At the end of each Table, we stop, calculate total minutes. New routine has been added to generate a $LISTUNIQUE (takes two passes, also a problem, but in workaround).
Then we try to loop through each task type (
%FOREACH%) which works, then through each row in the table (
%FOR{"X" start="0" stop="%CALC{"$EVAL(0-$ROW()+2)"}%" step="-1"}% ) This has been run from 2 to $ROW(0) Step = 1 as well. Same result.
Problem is that we are UNABLE make the
%CALC{"$T( address )"}% tag work with "variable interpolation". When we send to this tag a variable that looks fine as seen by "test output", it only ever provides the top or bottom row, but not increment.
Please assist in the resolution of this issue. The ability to track time in a Wiki Journal is a critical capability to eliminate the need to have us track our Time in Meetings in a Work ticket opened and closed weekly.
Essentially, it appears $T does not support "Variable Interpolation". This is where we can put a variable name in for a constant, and have it evaluated and interpeted as the constant.
We cannot send $T(R$r:C1) where $r comes from %FOR loop variable name. We cannot use Wiki variables such as %ROW% as the string is not first interposted. We have tried $VALUE and $EVAL and many many permutations.
Craig has suggested trying a
<nop> or
! or similar tag. Is it possible to help us get this "Variable Interpolation" to work with this tag so we can go back to creating the EngJournal blog. Support of per task type time reporting is critical to derailing an OSS centric dysfunctional alternate (default) proposal.
Recommendation is to hack this page to get it to work.
------current script------
%FOREACH{"taskname" in="%CALC{"$GET(tasktypesused)"}%"}%
%CALC{"$SET(mintname,mint$taskname)"}%
%CALC{"$SET(mintvalue,$IF($VALUE($GET($GET(mintname))),$GET($GET(mintname)),0))"}%
%FOR{"X" start="0" stop="%CALC{"$EVAL(0-$ROW()+2)"}%" step="-1"}%
%BR%X is $X
%CALC{"$SET(i,$X)"}%
i is %CALC{"$GET(i)"}%
%BR% Task is "%CALC{"$T(R$ROW($X):C1)"}%"
%NEXT{"X"}%
%CALC{"$SET($GET(mintname), $EVAL($mintvalue + 100))"}%
"%CALC{"$GET(mintname)"}%" = "%CALC{"$GET($GET(mintname))"}%"
| $taskname | %CALC{"$GET($EVAL($mintname))"}% |
%NEXT{"taskname"}%
Environment
--
JeanneneSchelski - 11 Jun 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
I moved this question from the
MyRecentQuestions topic to here. Please follow the
SupportGuidelines when asking support questions.
--
PeterThoeny - 11 Jun 2007
I am not sure I understand what you want to do. I think you should be able to use just CALC functions without FOREACH and FOR. I am not sure if there is an interference if you mix CALC, FOREACH and FOR.
CALC has a
$LISTMAP() to iterate over a list. There is also a
$SET() and
$GET() to set and get variables, respectively. See also
$EVAL(),
$EXEC(),
$NOEXEC() of
SpreadSheetPlugin.
You can also store frequently used formulae in
WebPreferences as preferences variables, such as:
- Set MYSPECIALFUNC = $SET(name, Tom) $EXEC($GET(msg))
And then use it in a CALC, such as
%CALC{ %MYSPECIALFUNC% }%
--
PeterThoeny - 11 Jun 2007
Closing, no more feedback.
--
PeterThoeny - 10 Aug 2007