Tags:
create new tag
view all tags

Question

I have a formatted search that lists a bunch of topics. I want to be able display the number of topics that are listed.

Thanks for any help.

Ryan

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Statistics

-- RyanBauerle - 05 Oct 2007

Answer

ALERT! 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.

By default, a SEARCH shows the number of hits. If you want a custom format you can use a SpreadSheetPlugin trick.

%SEARCH{ ..... format="$percntCALC{$SETM(num, +1)}$percnt other format..." }%

Total number of hits: %CALC{$GET(num)}%

-- PeterThoeny - 07 Oct 2007

Thanks! That did it.

-- RyanBauerle - 08 Oct 2007

It worked for me too, thanks. I also had to put a

%CALC{$SET(num,0)}%

somewhere before the search in order to correctly handle empty result set.

-- Thomas Fozzi - 2013-04-15

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2013-04-15 - ThomasFozzi
 
  • 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.