I found the solution (or at least one of them) myself: http://groups.google.com/group/TiddlyWiki/t/668c53729d5db321
YS Måns Mårtensson On 14 Mar., 21:58, Måns <[email protected]> wrote: > Hi cmari > Thank you for your patient and tolerant guidance - Now I'm ready for > gettting a picture from each tiddler into the table. > I've put an imagefield into each of the tiddlers - and now I would > like to fetch it... > > The table looks like this: > <<forEachTiddler where 'tiddler.tags.contains("Elev") && tiddler.data > ("Gang")&& tiddler.data("K-gruppe") && tiddler.data("K- > gruppe").contains(context.viewerTiddler.title)' > sortBy 'tiddler.data("K-gruppe")' > write > '(index < 200)? "|"+(index+1)+"|[["+tiddler.title+"]] | > [["+tiddler.data("Gang")+"]] | [["+tiddler.data("Kl") +"]] | <<wikify > [img(55%,auto)[%0]] bill...@here \>\> |<<toggleTag HU [["+tiddler.title > +"]] nolabel \>\> | <<toggleTag Syg [["+tiddler.title+"]] nolabel \>\> > |\n" : ""' > begin '"|sortable|k\n" > +"|>|>|>| !<<wikify %0 fulden...@here \>\> | | <<tiddler HUUpdate\>\> > | <<tiddler SygeUpdate\>\> |h\n" > +"|!#| <<wikify [img(55%,auto)[%0]] bill...@here \>\> | Gang | Klasse > | Billede | ![[HU]] | ![[Syg]] |h\n"' > end 'count+" kontaktgruppe elever\n"' none '"Ingen elever i denne > kontaktgruppe\n"'>> > > My problem is: <<wikify [img(55%,auto)[%0]] bill...@here \>\> > billede= the imagefield. > bill...@here gives me the imagefield in the tiddler containing the > table instead of the imagefield in the tiddler referred to in the > row... > How do I correct this?? > > YS Måns Mårtensson > > On 9 Mar., 14:22, cmari <[email protected]> wrote: > > > Hi Måns, > > Sorry that I didn't explain clearly enough. If you're going to look > > for text in the data field "Gang", you first have to check that the > > data field actually exists (so you need "tiddler.data("Gang")" as well > > as "tiddler.data("Gang").contains...."). For the template, maybe it's > > easier to see it. I put a really simple example > > at:http://cmaristandard.tiddlyspot.com/ > > cmari > > > On Mar 9, 2:28 am, Måns <[email protected]> wrote: > > > > 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 -~----------~----~----~----~------~----~------~--~---

