Eric - did you graduate from Hoggy Warty Hogwarts?
You just convinced me that the ECTS-scale doesn't fullfill it's
purpose when a true Wizards magic is involved :-)
(However scope was already blown by Mike's witchcraft.. )

I wonder how I can get a default message when there are no field to
fetch?
Is something like: g<0?'No grade to calculate yet'
possible?

regards Måns Mårtensson


On 10 Dec., 22:38, Eric Shulman <[email protected]> wrote:
> > I wouldn't try to shovel that into an evaluated expression. Instead,
> > create your own library tiddler, like MANS_Library, and tag it
> > systemConfig. Put this in it:
>
> To generate conditional output based on simple scripting logic, you
> can use
>    http://www.TiddlyTools.com/#InlineJavascriptPlugin
>
> Any text returned by the script is *automatically wikified* into the
> displayed tiddler content.
>
> <script>
> var grade=store.getTiddlerText("Students::JohnSmith");
> if(g<25) return "F";
> if(g<37) return "Fx";
> if(g<48) return "E";
> if(g<59) return "D";
> if(g<66) return "C";
> if(g<71) return "B";
> return "A";
> </script>
>
> Note: You *can* use a conditional expression to write this more
> compactly:
>
> <script>
> var g=store.getTiddlerText("Students::JohnSmith");
> return g<25?'F' : g<37?'Fx' : g<48?'E' : g<59?'D' : g<66?'C' :
> g<71?'B' : 'A';
> </script>
>
> enjoy,
> -e

--

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