Question
I have a search based on formfields. I want to exclude child topics (of the base topic) from the search. Ideally I want to exclude all offspring (eg grandchildren too etc).
I can create the 2 searches separately but cannot combine them.
My formfield search looks like this:
%SEARCH{"[F]ieldName.*value\=.*Example" type="regex" nonoise="on" format=" * [[$topic]]"}%
So this gives a bullet list of all topics with the FieldName=Example
%SEARCH{"META\:TOPICPARENT.*\"%TOPIC%\"" type="regex" format="$topic"}%
lists all the children, or
%TREE{topic="%TOPIC%" format="$topic"}%
lists all the offspring including grandchildren etc.
Trying to combine the first search with the %TREE%:
%SEARCH{"[F]ieldName.*value\=.*Example" excludetopic="%TREE{topic="$percntTOPIC$percnt" format="$topic"}%" type="regex" nonoise="on" format=" * [[$topic]]"}%
This give the same results as the first search, ie it is not recognising the
excludetopic bit.
Can anyone help?
Thanks
Tamsin
Environment
--
TamsinTweddell - 15 Apr 2008
Answer
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.
This looks like the inverse of
SearchWithinTopicTree. I think you need to upgarde to the latest version of
TreePlugin that allows you to pass back the tree as a comma separated list. See below for my example of a search that only includes children and grandchildren. I believe you can do the same for the exclude topic parameter in your example above.
%SEARCH{search="junk" web="Foo" topic="%TREEVIEW{web="Foo" topic="GrandParent" format="$topic" nodiv="1" separator=", "}%"}%
--
DeanSpicer - 15 Apr 2008
That's fantastic. Thanks. I was trying to do something similar, but hadn't noticed that the separator parameter wasn't in the version of TreePlugin I was using.
--
TamsinTweddell - 18 Apr 2008