Question
This should be a really simple thing, but i can't figure out how to do it :| Nor can i find any reference to what i'm looking for.
i'm using a SEARCH to find all topics with a specifed attribute, which is working fine, but all i want search to return is a single number like "2", not "Number of topics: 2" for example.
The reason is that i want to put this information in a table and then do math and such on it.
so for example i'm entering
Proposed |
[My Search command to return all proposed] |
Approved |
[My Search command to return all approved] |
and want it to return something
Environment
--
BrentTokarchuk - 03 Mar 2005
Answer
Use a
SpreadSheetPlugin variable in a
FormattedSearch. Steps:
- Initialize a CALC variable
- Do search; format just increases the variable by one
- Use the result in tables etc
Untested example:
%CALC{$SET(total,0)}%
%SEARCH{ "something" nosearch="on" nototal="on" format="$percntCALC{$SETM(total,+1)}$percnt" }%
%CALC{$GET(total)}%
--
PeterThoeny - 06 Apr 2005