Your sample looks sorted already, but of course I don't know what
order you want it sorted in. If its something simple, then maybe the
"sortBy" clause could help?
Your tiddler as written will write the first 200 items and then write
blanks for each item after that. I guess this will display OK, but if
you have a lot more than 200 items (like 300+) then the tiddler will
take longer than it needs in order to display. Or at least that's how
it would work in the world of SQL. I think you want something like
'index < 200 && tiddler.tags.contains("HU") && tiddler.data
("Gang")'
in your where clause, but without sample data ... don't know if that
will work.
-- Mark
On Jan 31, 2:03 pm, Måns <[email protected]> wrote:
> Hi Mark
>
> Now I've been fiddling around with Udo Borkowski's "List the first 10
> tiddlers that have the tag 'basic' in a table with a header" - and you
> are right!!
> It's exactly what I was searching for!!! Thank you very much for your
> help - Now I will retry to convince my fellowteachers that using
> TiddlyWiki for making lists, tables and printouts is a serious task...
> "<<forEachTiddler
> where
> 'tiddler.tags.contains("HU") && tiddler.data("Gang")'
> write
> '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> [["+tiddler.data("K-gruppe")+"]]|[["+tiddler.data("Gang")+"]]|
> [["+tiddler.data("Værelse")+"]]|\n" : ""'
> begin '"|!#|!Navn|K-gruppe|Gang|Værelse|h\n"'
> end 'count+" elever på HU i weekenden\n"'
> none '"Ingen på HU i weekenden\n"'
>
> <<snapshot print label:Udskrift prompt:Udskriv id:viewer>>"
>
> Here's the result:http://måns.dk/Billeder/images/ex4.png
>
> I'm getting a little "greedy" (don't know if it's the right
> expression) and will try to make Lewcid's TableSortingPlugin sort the
> table too - don't know if it's possible at all..
> If you have a workaround for making it happen - I would be very happy
> - but what I've got now - is very usable as it is!! Thanks again!!
>
> YC Måns Mårtensson
>
> On 31 Jan., 19:14, "Mark S." <[email protected]> wrote:
>
> > Look athttp://tiddlywiki.abego-software.deundertiddler:
>
> > "List the first 10 tiddlers that have the tag 'basic' in a table with
> > a header"
>
> > I think his example shows how to set up almost exactly the kind of
> > table you want.
>
> > -- Mark
>
> > On Jan 31, 9:47 am, Måns <[email protected]> wrote:
>
> > > Sorry for the lack of context.
> > > I need the list to be numbered - it is not neccesary with titles for
> > > each column (which unfortunatelyis repeated for each line of data from
> > > tiddlers in the table, when I try* ) and I cannot find a solution in
> > > the tiddlywiki.org pages concerning tables that adresses this issue.
>
> > > *When I write:<<forEachTiddler
> > > write '"|!col1|!col2|h\n|#cell1|cell2|\n"'
> > > >>
> > > *Then I get: |col1|col2| (headlinecolour)
> > > |cell1|cell2|
> > > |col1|coll2| (again!)
> > > |cell3|cell4|
> > > |coll1|coll2| - etc...
> > > My original code:
> > > <<forEachTiddler
> > > where
> > > 'tiddler.tags.contains("Data1") && tiddler.data("Data2")'
> > > sortBy 'tiddler.data("Data1")'
> > > write
> > > '"# "+tiddler.data("Data1")+" AND "+tiddler.data ("Data2")+"<br>
> > > \n"'>>
> > > When I put "|" in the line:
> > > '"|# "+tiddler.data("Data1")+" | "+tiddler.data ("Data2")+" | \n"'>>
> > > I loose the numbering.
> > > I dont know how to change that...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---