Tags:
create new tag
view all tags

Question

I am trying to %INCLUDE a series of topics based on a formatted search of formfield data. The problemis that where only one topic matches the search criteria all works well, but where more than one topic satisfies the criteria I get nothing.

I am looking for child topics of DioceseOfTrentonData, whose formfield 'Section Name'='Support Procedures'. Here is the statement as I've written it:

%INCLUDE{"%SEARCH{"(parent.name='%WEB%'.DioceseOfTrentonData) AND (Section_Name='Support Procedures')" type="query" nonoise="on" format="$web.$topic$n"}%" section="ProcedureSteps"}%.

What am I doing wrong?

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: BatchUploadPlugin, CommentPlugin, ContributorsPlugin, EditTablePlugin, EmbedFlashPlugin, ExcelImportExportPlugin, FlexWebListPlugin, GluePlugin, ImgPlugin, InterwikiPlugin, PreferencesPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin, TinyMCEPlugin, TwistyPlugin, WorkflowPlugin, WysiwygPlugin
Server OS: Unix but not sure
Web server: Apache but not sure
Perl version:  
Client OS: WINXP SP2
Web Browser: IE7
Categories: Search

-- EdBenet - 28 Oct 2008

Answer

ALERT! 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.

I think the SEARCH part needs multiple="on".

-- SeanCMorgan - 31 Oct 2008

I think INCLUDE can only include one topic at a time. So If your search return more than one topic it wont work. Try to put the SEARCH before and generate the include in the format. In your code when the search finds two topics you have this

%INCLUDE { “TopicOne” 
“TopicTwo”
}%

Try something like

 SEARCH{ ...  format=”%INCLUDE{ $topic }”...}%  

to have a result like this

%INCLUDE{ “TopicOne” }%
%INCLUDE{ “TopicTwo” }%

-- EnriqueCadalso - 31 Oct 2008

Good point, Enrique!

-- SeanCMorgan - 01 Nov 2008

The % of the INCLUDE needs to be escaped so that the include fires off for each search hit:

=%SEARCH{ ... format=”$percntINCLUDE{ $topic }$percnt” ...}% =

-- PeterThoeny - 03 Nov 2008

Change status to:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-11-03 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.