I still get errormessage: <<forEachTiddler ...>>: Unknown action '&&'.
for this code:
<<forEachTiddler
where
' tiddler.tags == context.inTiddler.title '&& tiddler.data
("Navn")'
sortBy 'tiddler.data("Navn")'
write '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
[["+tiddler.data("Gang")+"]]|[["+tiddler.data("Værelse")
+"]]|"+tiddler.data("Dato")+"|\n" : ""' begin '"|sortable|k\n|!#|Navn|
Gang|Værelse|Dato|h\n"'
end 'count+" this teachers students\n"'
none '"No students for this teacher\n"' >>
On 25 Feb., 22:03, Ken Girard <[email protected]> wrote:
> Make all of the section between 'write' & 'begin' into one line.
> Google Groups is adding in extra line breaks in that confuse it.
>
> Ken Girard
>
> On Feb 25, 1:36 pm, Måns <[email protected]> wrote:
>
> > Hi Ken
>
> > Thankyou for taking your time to answer my question.
> > I'm sorry to say that I cannot make it work in my context.
> > Here's what I done:
>
> > When I put ' tiddler.tags == context.inTiddler.title ' in place of
> > 'tiddler.tags.contains(" This tiddlers name") - then it gives me an
> > error = <<forEachTiddler ...>>:Unknown action '&&'.
>
> > I need the forEachTiddler macro to sort data from the tiddlers which
> > are tagged with THIS tiddlers name (as i did before) - so how do I get
> > it to accept && ??
>
> > For the second:
>
> > On 25 Feb., 15:02, Ken Girard <[email protected]> wrote:> For your first
> > question:
> > > <<forEachTiddler
> > > where
> > > ' tiddler.tags == context.inTiddler.title '
>
> > > For the second:
> > > If I write this:
>
> > <<forEachTiddler
> > where
> > ' tiddler.tags == context.inTiddler.title '
> > write
> > '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> > [["+tiddler.data("Gang")+"]] | [["+tiddler.data("Værelse")
> > +"]] | <<toggleTag HU [["+tiddler.title+"]] nolabel \>\> | <<toggleTag
> > Hjem [["+tiddler.title+"]]
> > nolabel \>\> |\n" : ""'
> > begin '"|sortable|k\n|!#|Navn|Gang|Værelse|HU|Hjem|h\n"'
> > end 'count+" elever i kontaktgruppen\n"'
> > none '"Ingen elever i kontaktgruppen\n"'
>
> > I get: <<forEachTiddler ...>>: SyntaxError: unterminated string
> > literal
>
> > Sorry If I'm doing something basically wrong - it appears to me though
> > that the faults I get are because of syntax - and not because I´m
> > using wrong parameters...
>
> > YS Måns Mårtensson
>
> > > '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> > > [["+tiddler.data("A")+"]] | [["+tiddler.data("B")
> > > +"]] | <<toggleTag A [["+tiddler.title+"]] nolabel \>\> | <<toggleTag
> > > B [["+tiddler.title+"]]
> > > nolabel \>\> |\n" : ""'
>
> > > But I couldn't get it to have no label.
>
> > > Ken Girard
>
> > > On Feb 25, 4:35 am, Måns <[email protected]> wrote:
>
> > > > Hi again - I post this bonus-question here, because it's another
> > > > syntaxproblem in the same context...
>
> > > > I would like to have 2 extra columns in the resulting table that
> > > > toggles tags on the tiddler in the corresponding row.
>
> > > > Like this: <<toggleTag SomeTag [[Tiddler title from corresponding
> > > > row]] nolabel>>
>
> > > > In full context:
>
> > > > <<forEachTiddler
> > > > where
> > > > 'tiddler.tags.contains("
> > > > this tiddlers title <- This is what I need - What is the correct
> > > > syntax/word for fetching it??
> > > > ") && tiddler.data("Name")'
> > > > sortBy 'tiddler.data("Name")'
> > > > write
> > > > '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> > > > [["+tiddler.data("A")+"]]|[["+tiddler.data("B")
> > > > +"]]|"+<<toggleTag A [[Tiddler title from corresponding row]]
> > > > nolabel>>|"+<<toggleTag B [[Tiddler title from corresponding row]]
> > > > nolabel>>"|\n" : ""'
> > > > begin '"|sortable|k\n|!#|Name|A|B|ToggleTagA|ToggleTagBh\n"'
> > > > end 'count+" Tiddlers tagged with this tiddlers title\n"'
> > > > none '"No tiddlers tagged with this tiddlers title\n"'
>
> > > > Is this possible??
>
> > > > Right now I'm doing it "by hand" and it's very tedious.
> > > > The problem is to integrate the toggleTagmacro into the
> > > > 'forEachTiddler where ... macro'.
> > > > I've tried - but putting toggleTagmacro into forEachTiddler macro
> > > > breaks the forEachTiddler macro - when I try....
> > > > If You know how to do this - I would be very happy to know!!
>
> > > > Here's my actual code for one of my 30 tiddlers - It would be very
> > > > nice to be able to make a template instead - then I would be able to
> > > > use my tw as a template for a new set of data:
>
> > > > |sortable|k
> > > > |[img(25%,auto)[Name|http://xxxxxx.jpg]]|[[A]]|[[B]]|[[C]]|[[D]]|h
> > > > | @@Remember to update!@@ |!<<tiddler AUpdate>>|!<<tiddler BUpdate>>|!
> > > > <<tiddler CUpdate>>|!<<tiddler DUpdate>>|
> > > > |[[1]]|<<toggleTag A [[1]] nolabel>>|<<toggleTag B [[1]] nolabel>>|
> > > > <<toggleTag C [[1]] nolabel>>|<<toggleTag D [[1]] nolabel>>|
> > > > |[[2]]|<<toggleTag A [[1]] nolabel>>|<<toggleTag B [[2]] nolabel>>|
> > > > <<toggleTag C [[2]] nolabel>>|<<toggleTag D [[2]] nolabel>>|
> > > > |[[3]]|<<toggleTag A [[3]] nolabel>>|<<toggleTag B [[3]] nolabel>>|
> > > > <<toggleTag C [[3]] nolabel>>|<<toggleTag D [[3]] nolabel>>|
> > > > |[[4]]|<<toggleTag A [[4]] nolabel>>|<<toggleTag B [[4]] nolabel>>|
> > > > <<toggleTag C [[4]] nolabel>>|<<toggleTag D [[4]] nolabel>>|
> > > > etc|etc ....
>
> > > > YS Måns Mårtensson
>
> > > > On 25 Feb., 10:52, Måns <[email protected]> wrote:
>
> > > > > I've searched the group and tw.org - trying to solve this on my own
> > > > > for a long time - and I know that the solution MUST be trivial - .
> > > > > Please tell me what to write to fetch tiddlers tagged with this
> > > > > tiddlers title.
> > > > > I'm using it in this context - wanting to make a template that changes
> > > > > results depending on the tiddlers title:
>
> > > > > Template:
> > > > > <<forEachTiddler
> > > > > where
> > > > > 'tiddler.tags.contains("
> > > > > this tiddlers title <- This is what I need - What is the correct
> > > > > syntax/word for fetching it??
> > > > > ") && tiddler.data("Navn")'
> > > > > sortBy 'tiddler.data("Navn")'
> > > > > write
> > > > > '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|
> > > > > [["+tiddler.data("Gang")+"]]|[["+tiddler.data("Værelse")
> > > > > +"]]|"+tiddler.data("Dato")+"|\n" : ""'
> > > > > begin '"|sortable|k\n|!#|Navn|Gang|Værelse|SDD|h\n"'
> > > > > end 'count+" elever i kontaktgruppen\n"'
> > > > > none '"Ingen elever i kontaktgruppen\n"'
>
> > > > > <<snapshot print label:Udskrift prompt:Udskriv id:viewer>><<fontSize>>
>
> > > > > YS Måns Mårtensson- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---