Hello,

This is my first post here. I discovered TiddlyWiki last November and got 
hooked by its power and beauty. I challenging myself into programming 
something which was supposed to be very simple in the beginning but who 
knew that this would become so addictive? Anyhow, I have a question I'm 
hoping someone here could help me with.

How can one loop through tiddlers which are two levels downstream in the 
tag-hierarchy or further? I already figure out how to copy a field value 
from the current tiddler to all tiddlers which are tagging it and which 
also have the tag 'task' but what I think I need help with is to propagate 
the value 2-3 levels further.

The following code fragment reads the task_visibility (custom) field of the 
current tiddler and applies it to the next level below (only to tiddlers 
which are also tagged with 'task').

<$set name="taskVisibilityValue" value={{!!task_visibility}}>
<$list filter="[tag[task]tag<currentTiddler>]">
<$action-setfield $field="task_visibility" $value=<<taskVisibilityValue>> >
</$list>

Note: The filter above can be replaced with 
"[all[current]tagging[]tag[task]]" - it works just the same.

One of the things I tried for taking this one level further down the task 
hierarchy was nesting the lists:

<$set name="taskVisibilityValue" value={{!!task_visibility}}>
<$list filter="[all[current]tagging[]tag[task]]">
<$action-setfield $field="task_visibility" $value=<<taskVisibilityValue>> >
<$list filter="[all[current]tagging[]tagging[]tag[task]]">
<$action-setfield $field="task_visibility" $value=<<taskVisibilityValue>> >
</$list>
</$list>

This code still works only on the first level below the current tiddler. 
Does anyone know how to apply this to the next level below the first child 
level (and further)?

I'm also wondering whether it is a good idea to do this (or how far down to 
go), whether there are performance issues to be expected with a loop like 
this, when the hierarchy below the current tiddler might contain dozens of 
tiddlers.

Best regards,
Pall
- Currently on version 5.1.23

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/253703b6-5b32-49de-89c4-d7046b3630d4n%40googlegroups.com.

Reply via email to