Tags:
create new tag
, view all tags

Question

I am having a problem when using a custom comment template topic with Spreadsheet plug-in logic. And I'm not sure how to proceed.

A new topic is generated with a custom comment. The custom comment should add text to the bottom of the page based on the information specified in the comment.

However if the comment contains a comma, the spreadsheet IF logic contained in the comment template no longer works, because the CALC{IF(URLPARAM()...)} is embedded in the page HTML, and not evaluated immediately.

How do I force the CALC{IF()} logic to be expanded at the same time the URLPARAM is expanded to prevent this problem.

I have tried URLPARAM encode="entity" and encode="url", but these do not code a comma.

Comment Teplate Topic

%TMPL:DEF{PROMPT:issueupdatenew}%
<input %DISABLED% type="hidden" name="date" value="%DATE%"/>
%TABLE{ headeralign="right" dataalign="left" }%
| *Issue Status:* | <select name="CSStatus" ><option %SEARCH{ "CSStatus.*?value=\"SupportIssueReported\"" topic="%TOPIC%" scope="text" regex="on" nonoise="on"  format="SELECTED" }% >SupportIssueReported</option> <option %SEARCH{ "CSStatus.*?value=\"SupportIssueAssigned\"" topic="%TOPIC%" scope="text" regex="on" nonoise="on"  format="SELECTED" }% >SupportIssueAssigned</option> <option %SEARCH{ "CSStatus.*?value=\"SupportIssueResolved\"" topic="%TOPIC%" scope="text" regex="on" nonoise="on"  format="SELECTED" }%>SupportIssueResolved</option></select> |  __Note:__ Change status if needed|
| *Explanation:* | <textarea %DISABLED% name="answer" wrap="virtual" rows="6" cols="80" ></textarea> |  __Note:__ Add comment or explain solution |
| <input %DISABLED% class="twikiSubmit" type="submit" value="Update"/> |
%TMPL:END%
%TMPL:DEF{OUTPUT:issueupdatenew}%
%POS:BOTTOM%
   * *Issue Status Change:* _<NOP>%URLPARAM{"CSStatus"}%_ -- %WIKINAME% - %DATE%:  %CALC{"$IF($LENGTH(%URLPARAM{"answer"}%,<UL><LI>%URLPARAM{"answer"}%</LI></UL>,)"}%
%TMPL:END%

Generated Comment Text

Topic revision: r3 - 2008-04-03 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.