Question
I want to retrieve the parent of a topic. This works in principle with:
-
The raw code:
%SEARCH{ "^%BASETOPIC%$" scope="topic" web="%BASEWEB%" regex="on" nosearch="on" nototal="on" zeroresults="off" format="- $parent(15, ...) %BR%" }%
But when no parent is set, I don't want to display anything.
How can I turn off the results when nothing is found?
Related: WebSideNav
Environment
--
ArthurClemens - 06 Feb 2006
Answer
You can do that with a
SpreadSheetPlugin CALC that gets evaluated
after the search:
%SEARCH{ "^%BASETOPIC%$" scope="topic" web="%BASEWEB%" regex="on" nosearch="on" nototal="on" zeroresults="off" format="$percntCALC{$IF($EXACT($parent,), , - $parent(15, ...) %BR%)}$percnt" }%
--
PeterThoeny - 06 Feb 2006
Thanks. But this gets way too complicated for such a simple question. I suggest a new parameter to SEARCH in case of no results:
alt="nothing found".
--
ArthurClemens - 06 Feb 2006