>
> /%
> !out
> $1
> !end
> %/<<tiddler ShowList##out with: {{
> var out=[];
> var target="$1";
> var tids=store.getTiddlers();
> for (var i=0;i<tids.length;i++) {
>    var alpha=tids[i].fields.owneralpha;
>    var beta=tids[i].fields.ownerbeta;
>    if (alpha && alpha.contains(target)
>       || beta && beta.contains(target))
>          out.push("*[["+tids[i].title+"]]");}

This works perfectly thank you very much.

A new problem, however, arises out of this solution.

Let's say I create an additional two custom fields owneralphapercent
and ownerbetapercent. And create two tiddlers, percentLinkAlpha and
percentLinkBeta in which I put

 /%
!out
[[$1|$2]]
!end
%/<<tiddler percentLinkAlpha##out with:
   {{store.getValue('$1','owneralphapercent')}} [[$1]]>>

Futhermore I change the above code to

/%
!out
$1
!end
%/<<tiddler ShowList##out with: {{
var out=[];
var target="$1";
var tids=store.getTiddlers();
for (var i=0;i<tids.length;i++) {
   var alpha=tids[i].fields.owner3;
   var beta=tids[i].fields.owner6;
   if (alpha && alpha.contains(target))
         out.push("This tiddler own: <<tiddler percentLinkAlpha with:
[["+tids[i].title+"]]>>  of [["+tids[i].title+"]]");
  if (beta && beta.contains(target))
          out.push("This tiddler own: <<tiddler percentLinkBeta with:
[["+tids[i].title+"]]>>   of [["+tids[i].title+"]]");
}

out.join("\n");}}>>

Can this be made to work? How do stop the right chevrons (>>) I've
added from executing the code prematurely?

My goal is to have
<<tiddler ShowList with: tiddlerFive >> write something like, 'This
tiddler own: 75% of tiddlerOne'
 
'This tiddler own: 66,66% of tiddlerTwo'

Regards

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to