I want to search through a specific tiddler's custom fields and if I match a specific value, have a specific custom field's value output.
My thinking is along the lines of (two easy steps): 1. Creating a tiddler named MyList with the following content: _______________________________ % !out $1 !end %/<<tiddler ShowNewerList##out with: {{ var out=[]; var target="$1"; var tids= store.getTiddler('title') == $2; for (var i=0;i<tids.length;i++) { var a=tids[i].fields.somefield1; var b=tids[i].fields.somefield2; var c=tids[i].fields.somefield3; if (a && a.contains(target)) out.push(" <<tiddler somefield1Link with: [["+tids [i].title+"]]>\>)"); if (b && b.contains(target)) out.push(" <<tiddler somefield2Link with: [["+tids [i].title+"]]>\>)"); if (c && c.contains(target)) out.push(" <<tiddler somefield3Link with: [["+tids [i].title+"]]>\>)"); } out.join("\n");}}>> _______________________________ somefield1Link contains (and the other somefieldLinks contains something similar)r: _______________________________ /% !out [[$1|$2]] !end %/<<tiddler somefield1Link ##out with: {{store.getValue('$1','fieldvalueiwant')}} [[$1]]>> _______________________________ 2. Inputting the following into the tiddler: _______________________________ <<tiddler MyList out with: OneTiddler AnotherTiddler>> _______________________________ I am hoping for 'fieldvalueiwant' s value in AnotherTiddler if and only if, AnotherTiddler contains "OneTiddler" in somefield1, somefield2 or somefield3. ------------------------------------------------------------------- But the whole thing doesn't work and I cant figure quite figure it out Testing I created a tiddler; TestList containing: _______________________________ Target: $1 Tiddler: $2 _______________________________ And this works like I want it to work (using <<tiddler TestList out with: OneTiddler AnotherTiddler>> the result is Target: OneTiddler Tiddler:AnotherTiddler, so I am guessing that the line: "var tids= store.getTiddler('title') == $2;" is the problem but the only way i can make it work is by searching through every tiddler ( store.getTiddlers(); ) which returns results I am not interested in. (the whole thing is an attempt to link certain tiddlers with other tiddlers displaying different precentals of ownership - cf. http://tinyurl.com/yctnr49) -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to tiddlyw...@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.