Not necessarily.
Given a web, and set of topics with a particular form attached you may simply write the following:
%INCLUDE{"%TOPIC%" section="prettyprint" form="BasicForm" inweb="%WEB%" limit="10"}%
Result:
Number of topics: 10
Solution
%STARTSECTION{"prettyprint"}%%SEARCH{
"form.name='%form%'"
type="query"
web="%inweb%"
limit="%limit%"
header="%SEARCH{
"form.name='%form%'"
type="query"
web="%inweb%"
nonoise="on"
limit="1"
format=" | *Topic* | $percentINCLUDE{\"%TOPIC%\" section=\"header\" webtopic=\"$web.$topic\"}$percent |"
}%"
format=" | [[$web.$topic][$topic]] | $percentINCLUDE{\"%TOPIC%\" section=\"row\" webtopic=\"$web.$topic\"}$percent |"
}%%ENDSECTION{"prettyprint"}%%STARTSECTION{"row"}%%FORMAT{
"%QUERY{"'%webtopic%'/fields[NOT lc(attr)=~'h'].name"}%"
type="string"
format="$percentQUERY{\"'%webtopic%'/$item\"}$percent"
separator=" | "
}%%ENDSECTION{"row"}%%STARTSECTION{"header"}%%FORMAT{
"%QUERY{"'%webtopic%'/fields[NOT lc(attr)=~'h'].name"}%"
type="string"
format=" *$item* "
separator=" | "
}%%ENDSECTION{"header"}%
Caveats
The solution assumes every topic which matches the query uses the same form definition; and that each topic will have the same number of fields (this won't be the case if you've grown your formfield definition over time: some topics will have fewer fields than others, which will break the table).
--
PaulHarvey - 15 Jan 2011
Depends on
FlexFormPlugin
* Set form = YourForm
* Set inweb = %WEB%
* Set limit =100
%STARTSECTION{"prettyprint2"}%%SEARCH{
"form.name='%form%'"
type="query"
web="%inweb%"
limit="%limit%"
header="| *Topic* | %RENDERFORDISPLAY{
form="%form%"
format="*$name*"
separator=" | "
}% |"
format="| [[$web.$topic][$topic]] | %RENDERFORDISPLAY{
form="%form%"
format="$formfield($name)"
separator=" | "
}% |"
}%%ENDSECTION{"prettyprint2"}%
This solution will render the formfields as defined in the dataform.
--
PaulHarvey - 08 Aug 2011