Tags:
create new tag
view all tags

SID-01334: Generating a topic index with the SpreadSheetPlugin

Status: Answered Answered TWiki version: 5.0.2 Perl version:
Category: SpreadSheetPlugin Server OS: SLES 11 Last update: 14 years ago

I was trying to generate some kind of dynamic list based on your example DashboardWithDynamicInclude in the SandBox Samples

The list is generated from the formfield 'Document Type' in the topics.

This is my code but I am unable to get any index results, through there are 9 hits from the search: <verbatim> %SEARCH{ "Question" scope="text" web="TSD" reverse="on" limit="30" nonoise="on" format="<nop>$percntCALC{$SET($formfield(Document Type), $GET($formfield(Document Type)))}$percnt"}%

<!-- define list --> %CALC{"$LISTJOIN($comma,$LISTNONEMPTY($GET(Document Type)))"}%

<!-- number of columns in table --> %CALC{$SET(cols, 4)}% <!-- init cell number --> %CALC{$SET(n, 0)}%

<noautolink> <font size="-1"> </font> </noautolink> <table border="1" cellspacing="0" cellpadding="5" width="100%"><br><tr> <th colspan="%CALC{$GET(cols)}%" bgcolor="#CCCCCC"><br>Dashboard Example</th></tr>

<tr> %CALC{$TRANSLATE($LISTMAP(<td valign=\"top\"><b>$item</b>%BB% link: $item%BB% lower: $LOWER($item)%BB% upper: $UPPER($item)%BB% spaced: $PROPERSPACE($item) </td> $SETM(n, +1)$IF($MOD($GET(n),$GET(cols)),,</tr><tr>), $GET(list)),$comma,$sp)}% </tr></table>

</verbatim>

-- RonMascarenhas - 2011-11-18

Discussion and Answer

$SET requires a variable name as the first parameter. In CALC{$SET($formfield(Document Type), $GET($formfield(Document Type)))}$percnt you try to set the value of the field Document type to a variable, so you should use something like CALC{$SET(doc_type, $GET($formfield(Document Type)))} and then later retrieve that value using $GET(doc_type).

-- EnriqueCadalso - 2011-11-20

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2012-01-23

      Change status to:
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.
SupportForm
Status Answered
Title Generating a topic index with the SpreadSheetPlugin
SupportCategory SpreadSheetPlugin
TWiki version 5.0.2
Server OS SLES 11
Web server Apache2
Perl version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2012-01-23 - 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.