Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SunOS 5.8
Web server: apache
Perl version:  
Client OS: Windows 2000
Web Browser: Opera 7
Categories: Search

-- 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

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2004-11-25 - FranzJosefSilli
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.