Priority: Normal
Current State: No Action Required
Released In:
Target Release:
Applies To: Engine
Component: Search
Branches:
If a simple
SEARCH has a header parameter, the header is only shown when there are results.
If a
SEARCH
contains a nested
$percntSEARCH{}$percnt
, and that search does not return any results, the header is still displayed.
For example from Support web (modified to return no results for sure):
%SEARCH{
" *\s*.*?"
topic="QuestionSubjectCategory"
web="Support"
type="regex"
multiple="on"
casesensitive="on"
nonoise="on"
header="---++ Answered but needs refactoring"
format="$percntSEARCH{ $quotQuestionForm.Status='XXXAnswered but needs refactoring' AND QuestionForm.Subject='$pattern(.* \*\s*([^\n]*).*)'$quot excludetopic=$quotQuestionTemplate$quot web=$quotSupport$quot type=$quotquery$quot format=$quot * [[$dollarweb.$dollartopic][$dollarformfield(TopicTitle)]]$quot order=$quotmodified$quot reverse=$quoton$quot nonoise=$quoton$quot header=$quot---+++ $pattern(.* \*\s*([^\n]*).*)$quot}$percnt"
}%
results in:
Answered but needs refactoring
--
ArthurClemens - 05 Feb 2009
Judging from what I see in
http://trunk.foswiki.org/bin/view/Tasks/Item999, this is fixed. Arthur, can you close it if you agree.
--
CrawfordCurrie - 06 Jun 2010
I am still seeing the header while there is no search result.
--
ArthurClemens - 06 Jun 2010
Oh right, sorry, I misread the report. Sven, anything you can do, or are we stuck with this behaviour?
--
CrawfordCurrie - 07 Jun 2010
this cannot be a bug. the outer
SEARCH has found a result, which is why the inner $percentSEARCH is triggered - which also means that the outer
header
should be displayed.
IMO, there is no (current or consistent) way that the outer
SEARCH should modify its behavior based on what happens inside its
format
its the same as
SEARCH{
"..."
header="got something.."
format="$formfield(not_there)"
in which case the header is also displayed.
--
SvenDowideit - 22 Jun 2010
OK, then I guess we have to have confidence in your convictions and no-action it.
--
CrawfordCurrie - 24 Jun 2010