I can't make it work though...
I've put the <<tiddler [[MyTemplate]]>> into a tiddler with the name =
(context.viewerTiddler.title) - and I know I have several tiddlers
tagged with that title (MM).
Heres my fET-code put into a tiddler called MM:
<<forEachTiddler where 'tiddler.tags.contains("Elev")&&tiddler.data
("K-gruppe")&&tiddler.data("Gang").contains
(context.viewerTiddler.title)'
sortBy 'tiddler.data("K-gruppe")'
write
'(index < 200)? "|"+(index+1)+"| [["+tiddler.title+"]] |
[["+tiddler.data("Gang")+"]] | [["+tiddler.data("Kl") +"]] |
<<toggleTag HU [["+tiddler.title+"]] nolabel \>\> | <<toggleTag Syg
[["+tiddler.title+"]] nolabel \>\> |\n" : ""'
begin '"|sortable|k\n"
+"|>|>|>| !"+tiddler.title+" |<<tiddler HUUpdate\>\>|<<tiddler
SygeUpdate\>\> |h\n"
+"|!#| [img(55%,auto)[+tiddler.title+"]|"+tiddler.field("billede")+"]]
| Gang | Klasse | ![[HU]] | ![[Syg]] |h\n"'
end 'count+" kontaktgruppe elever\n"' none '"Ingen elever i denne
kontaktgruppegruppe\n"'>>
YS Måns Mårtensson
On 9 Mar., 04:36, Måns <[email protected]> wrote:
> Thanks cmari - that was exactly what I was looking for.
>
> YS Måns Mårtensson
>
> On 9 Mar., 00:38, cmari <[email protected]> wrote:
>
> > Hi Måns,
>
> > > I need fET to be able only to fetch data from tiddlers, which contains
> > > Data="the title of the tiddler holding the fET-code".
>
> > I do this frequently. It requires three things in the where clause:
> > 1. look for a tag (or tags);
> > 2. find tiddlers in which the data field even exists;
> > 3. look for a match with the current tiddler's title:
> > <<forEachTiddler where 'tiddler.tags.contains("myTag")&&tiddler.data
> > ("mydatafield")&&tiddler.data("mydatafield").contains
> > (context.inTiddler.title)'>>
>
> > Alternatively, you can use a template. Put this into a tiddler called
> > [[MyTemplate]]:
> > <<forEachTiddler where 'tiddler.tags.contains("myTag")&&tiddler.data
> > ("mydatafield")&&tiddler.data("mydatafield").contains
> > (context.viewerTiddler.title)'>>
>
> > Then, in any tiddler that has the title of the piece of information
> > you want to find in mydatafield, you can put:
> > <<tiddler [[MyTemplate]]>>
> > cmari
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---