Question
I have a table search query result. For one colum I do a CALC in the end. i.e.
SEARCH{ "[T]estVersion.*value=.My Version 1.0;[T]estCaseType.*value=.Original" casesensitive="on" regex="on" nototal="on" nosearch="on" order="modified" reverse="on" format="| $formfield(
TestCoverage) |"}
| CALC{"$ROUND($AVERAGE($ABOVE()),2)"} |
to track the progress.
I like to refer to the calculated value in another topic
as well. How can I do this?
I played with the get and set functions in the spread sheet plugin, but they don't work accross topics.
Can I define some custom variables or use some META options.?
Environment
--
KaiMoorfeld - 11 Nov 2004
Answer
Did you try an hidden
%INCLUDE of your SEARCH at the topic where you want to round-up? See also
SpreadSheetRollupTest.
--
FranzJosefSilli - 11 Nov 2004
Franz correctly points out the mechanism to achieve what appears to be the rollup of several sub-spreadsheets -- the trick is to bring them into your current topic as hidden text via
Warning: Can't find topic "".""
. The reason it has to be this way is simply but took me awhile to get my head around.
Simply stated, the spreadsheets that we want to use (and hence, the summary calcs) don't "exist" until we run them through "VIEW.CGI". We tossed around various ideas, like saving %CALC% results in a topic, but this lead to all sorts of horrendous unwanted behavior. Simplest (and fastest) way was to get the spreadsheets to render but to never display them.
You can thank Peter for the Rollup example.
--
SteveRJones - 15 Nov 2004
Another option is to assign values in an INCLUDEd topic with $SET() and read them back with $GET().
--
PeterThoeny - 16 Nov 2004
I tried the INCLUDE TOPIC approach and used the variable assignment, but since the table in the included topic is the result of a formatted SEARCH it is displayed even though I hide it.
--
KaiMoorfeld - 23 Nov 2004
Ok, I figured it out myself. The reason was that I had a hidden comment in the topic I included, which apparently closed the hide command for the include statement.
--
KaiMoorfeld - 25 Nov 2004