SID-01942: Use of COUNTSTR with Icons
| Status: |
Answered |
TWiki version: |
|
Perl version: |
|
| Category: |
SpreadSheetPlugin |
Server OS: |
|
Last update: |
10 years ago |
Hi
I need to count cells in a table by using the COUNTSTR variable, the string to look correspond to graphic ICONS, What string should I use as argument for the COUNTSTR variable?
%CALC{"$COUNTSTR($ABOVE(), ??)"
Table Column
Thanks in advance
--
TWiki Guest - 2014-06-29
Discussion and Answer
Correct, use
%CALC{$COUNTSTR($ABOVE(), wip)}% to count the number of times "wip" occurs above the current cell. Example:
| TODO |
| wip |
| choice-yes |
| wip |
| stop |
| wip |
| Count "wip": 3 |
--
Peter Thoeny - 2014-06-29
It doesn't work, I have to mention that what is displayed in the table Column is the Icon graphic not the text.
This the table structure I'm using.
%EDITTABLE{format="|text|select,1,%Type%|text,12|text,30 |date,10,,%d-%a|text,20|text,20|text,4|text,4|text,4|text,4|text,4|select,6,%<nop>Ongoing%,%<nop>Completed%,%<nop>Postponed% |Text|Text|" changerows="add", buttonrow="top", quietsave="off"}%
<!--
- Set Completed= <img src="%ICONURL{done}%" width="37" height="16" alt="Done" border="0" />
- Set Postponed= %ICON{stop}%
- Set Ongoing= %ICON{wip}%
-->
Thanks again
--
TWiki Guest - 2014-06-30
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!
--
Peter Thoeny - 2015-12-03
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.