Change current tiddlers field value based on tagged tiddlers field value

hi

if i have Tiddler B and tiddler C tagged with Tiddler A , and similarly Tiddler Y and Tiddler Z taggged with Tiddler X , and all tiddlers have a customfield1 = 1

so

Tiddler A Tags :dummy customfield1 = 1
Tiddler B Tags :Tiddler A customfield1 = 1
Tiddler C Tags :Tiddler A customfield1 = 1

Tiddler X Tags :dummy customfield1 = 1
Tiddler Y Tags :Tiddler X customfield1 = 1
Tiddler Z Tags :Tiddler X customfield1 = 1

i want to make a button to change the field value of customfield1 in Tiddler A ,or Tiddler X from 1 to 2 if any of the tagged tiddlers underneath had a change in the customfield1 field value from 1 to anything else.

so i basically need to go to all tagged tiddlers, see if any of their customfield1 values is not 1 , then go back to the Tag tiddler and change its customfield1 value to 2 based on the evaluation

i have done this

<$list filter="[tag[dummy]tagging[]get[customfield1]!match[1]then[yes]else[no]]">

which evaluates correctly to Yes Yes (because in my wiki both hierarchies meet the condition)
but then not sure where to go from there

so i did

<$list filter="[tag[dummy]tagging[]] :filter[get[customfield1]!match[1]]">

which yielded all tiddlers metting the condition , but then now i want to reverse do lookup in a sense, back to their tags as they will be the tiddlers to take action on

i tried tags[] at the end of the filter , didnt work , what could i be doing wrong,

Thank you

Try this:

<$list filter="[tag[dummy]tagging[]] :filter[get[customfield1]!match[1]] +[tags[]tag[dummy]]">
2 Likes