Thanks Eric,

It looks obvious once you see it !
I managed to make it work, piecing it together with Morris Gray's
syntax (see below). However your script assumes the field contains as
values tiddler names, which my script does not. I just want to filter
by field value, eg whenever field 'time' == value 'now' display the
tiddlers. I added a condition, but don't see how to add to the
'titles' list the tiddler title instead of 'val'. (The truth being I
don't know JS ;-) Any help ?

Scalpa

<<tiddler MyOpenTiddlers##script>>
/%
!script
<script label="MyOpenTiddlers">
   var titles=[];
   store.forEachTiddler(function(title,tiddler){
      var val=store.getValue(title,'time');
      if (val==undefined) return;
      if (val=='now') titles.pushUnique(val);
   });
   story.displayTiddlers(null,titles);
</script>
!end
%/

 and here's a forEachTiddler loop that lists what I want, but inside a
tiddler instead of opening all the relevant tiddlers.

<<forEachTiddler
   where
      ' store.getValue(tiddler,"time") == "now" '
write '"[["+tiddler.title+"]] "'>>


On Feb 13, 8:31 pm, Eric Shulman <[email protected]> wrote:
> > However I cannot make the above script to work ! I get the following
> > message
> > TypeError: store.displayTiddlers is not a function
>
> oops... typo!  that should be story.displayTiddlers(...)  not
> store.displayTiddlers(...)
>
> The "store" functions are related to saving/retrieving/searching
> tiddler data.
> The "story" functions are related to rendering/displaying content.
>
> sorry for the confusion...
>
> -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