Hi - I'm back again.
I've been trying to adapt the script given in post 2 and I've tried
this but it doesn't return anything - have I overlooked something?
(There are 12 tiddlers tagged with CCF2009 and most have some value or
other in "QM" field)

Many thanks in advance

<script>
   var tids=store.getTaggedTiddlers('CCF2009');
   var count=0; var total=0;
   for (var i=0; i<tids.length; i++) {
      var d=DataTiddler.getData(tids[i].title,'QM');
      if (d) { count++; total+=parseInt(d); }
   }
   if (count) return total;
</script>


On Jul 23, 1:16 pm, Kino <[email protected]> wrote:
> OK! I realise now I'd made some silly mistakes...
>
> window.MyData.e =  store.getTaggedTiddlers("CCF2009").length.toString
> ();
>
> now returns the correct "value", but it is still a string and I need a
> numerical value.
>
> using the above with Number(...) or mutiplying by 1 doesn't work.
>
> I think I may have to resort to the example you gave in Post 2.
>
> On Jul 22, 2:42 pm, Eric Shulman <[email protected]> wrote:
>
> > >  <script>
> > > window.MyData = {};
> > > window.MyData.d = store.getTaggedTiddlers("CCF2009");
> > > window.MyData.e = store.getTaggedTiddlers("CA2009");
> > > return e;
> > >  </script>
> > > which returns the result ReferenceError: e is not defined
>
> > The above script doesn't define a *local* variable named 'e'...  thus,
> > the error.  Maybe you meant to refer to 'window.MyData.e' instead?
> > Also, in order to display output, the return value from an inline
> > script has to be a *text string*.  Try writing something like this:
>
> >    return window.MyData.e.length.toString();
>
> > -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