My goal is to make a calculation of how many fields are set to true,
and depending on the amount within an interval I will get different
outputs reflecting the ECTS grades. 
http://en.wikipedia.org/wiki/ECTS_grading_scale
The idea is to use wikicalcs ability to use conditional expressions.
I'll try to express what I want in wikiCalc syntax mixed up with
homemade conditions:
<<wikiCalc "%0" number of fields set to true>>
<<wikiCalc "(%0)<1?'F':'"(%0)>0<25?'Fx'"(%0)>24<37?'E'"(%0)
>36<48?'D'"(%0)>47<59?'C'"(%0)>58<66?'B'"(%0)>65<71?'A'>>

If you know how to change the code above into something usable or how
to do it with a fET instead please tell.

Regards Måns Mårtensson

On 10 Dec., 01:15, Måns <[email protected]> wrote:
> Hi TwWizards (and Eric)
>
> I read this old 
> post:http://groups.google.dk/group/tiddlywiki/browse_thread/thread/4f1a8c9...
>
> I tried it out:
> <<wikiCalc "%0/%1" [[MyFood::Vegetables]] [[MyFood::Hamburgers]]>>
> Your diet is <<wikiCalc "(%0/%1)<1?'unhealthy... eat more
> vegetables':'healthy... keep it
> up'"[[MyFood::Vegetables]] [[MyFood::Hamburgers]]>>
> |Vegetables|5|
> |Hamburgers|6|
>
> It doesn't seem to work..
> I wonder if the extra two lines of code has been removed again?:
>
> >I've just added a minor tweak (only two lines) to the existing plugin
> >code, it can now assemble a javascript expression from slice values
> >(automatically retrieved by the core's macro handler) and then also
> >'eval' that expression to compute a new value before it is output as
> >wiki-formatted content.
>
> Or I have made some kind of misspelling in the syntax ??
>
> YS Måns Mårtensson

--

You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.


Reply via email to