The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl
the SLANG EXTENSION and Guest Programming >> Slang Rules Scripts, Functions, Examples and HOW TO >> Re: Word count
http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1195780011

Message started by Admin on 06/06/12 at 07:42:07

Title: Re: Word count
Post by Admin on 06/06/12 at 07:42:07



here is an update:

Auto-Rule that calculates total of item AND total of all sub items...



Code:
++:!+-MNFICP:len(replace(replace(replace(ITT,"!",".",1),"[A-Za-z][\w'\-]*","!",1),"[^!]","",1))  + sumc(fv("WordCount"), !fv("Skip")) : (ITT  OR [WordCount]) AND ([CountEm?] OR [^CountEm?])
++:!+: (len(replace(replace(replace(ITT,"!",".",1),"[A-Za-z][\w'\-]*","!",1),"[^!]","",1))  + sumc(fv("WordCount")) - [MaxCount]) * -1: [MaxCount]



How to use:

WordCount is a numeric folder where this rule resides.
CountEm? if a check folder that turns on/off counting for an item and all its children.
MaxCount is a numeric folder that contains MAX COUNT value.  The difference with the sum of word count of children is shown in WordCount folder instead of count value.
Skip is check folder that allows SKIPPING selected sub items from the count total.



The eccoMAGIC Forums » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.