This question about Topic Markup Language and applications: Answered

Nested search returns 0 results

I'm trying to do a nested search to separate my FAQs into categories. The individual searches both work, but they don't play well together. Here's what I've go so far; split into multiple lines to make it easier to see, but all one line on my wiki:
%SEARCH{ "\|[^*]*?\|" topic="FaqCategory" type="regex" nosearch="on" nototal="on" multiple="on" noheader="on" 
format="---++ $pattern(.*\|\s*(.*?)\s*\|.*) FAQ $n 
$percntSEARCH{  \"FaqCategory='$pattern(.*\|\s*(.*?)\s*\|.*)'\" type=\"query\" nosearch=\"on\" nototal=\"off\" 
format=\"   * $dollarpattern(.*---\\+\\+ FAQ:\s*([^\\n]*).*) [[$dollartopic][Answer]]\" }$nop%" }%

The idea here is that I added a form to the FAQ, and the user picks the category for the FAQ. Then the search prints each category followed by the FAQs therein. But the second search yields 0 results. I've tried several different versions of escaping, and if I change $percntSEARCH to just SEARCH, so that the text of the search shows up on the page, rather than the result of the search, it looks like it should work.

Any suggestions appreciated!


Maybe not exactly what you want but I have done something similar with grouping procedure topics

%FOREACH{"category" in="%SEARCH{"   * " web="%BASEWEB%" topic="FaqCategories" type="regex" casesensitive="on" nosummary="on" nosearch="on" multiple="on" noheader="on" nototal="on" separator=", " format="$pattern(.*   \* ([^\n]*).*)"}%"}%
---++++!! '$category' Faq's
$percntSEARCH{"Category='$category'" web="%BASEWEB%" type="query" topic="Faq*" order="formfield(Title)" excludetopic="*Template*" multiple="on" casesensitive="on" nosummary="on" nosearch="on" noheader="on" nototal="on" format="   * [[$web.$topic][$formfield(Title)]] <span style=\"font-size: 70%; color: #808080\"> last modified by  $wikiusername on $date</span> "}%
%NEXT{"category"}%

Note: you will have to install and use the ForEachPlugin but its a really useful extension. It should be self explanitory. If not let me know. As always there is probably an easier way to do this..

-- PadraigLennon - 09 Feb 2010


Wow, what a maroon I am. The category was "NewUser", and when I moved the categories to a separate topic, I spelled it "NewEmployee". Then I wondered why it didn't match...

But I'm glad I posted anyway, because the ForEachPlugin is pretty cool, and I've installed it.

Thanks for answering my question!

-- DougClaar - 09 Feb 2010

QuestionForm edit

Subject Topic Markup Language and applications
Extension ForEachPlugin
Version Foswiki 1.0.9
Status Answered
Topic revision: r3 - 09 Feb 2010, DougClaar
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy