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

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