Hi there, 

I have many tiddlers (of the same unique type), which contain the field 
"senses". The 'senses' field contains values that look something like this: 
"Darkvision 60ft., passive Perception 12". Now, it has come to my attention 
that it would be far more useful for Passive Perception to be its own field 
with its own numeric value. Instead of doing this manually, as there are 
hundreds of tiddlers like this, I want to make a button that will do this 
by batch. Basically, I want to take the last word (which is actually a 
number in all cases) from the 'senses' field and put it into a new 
"passive-perception field". I have played around with the list widget and 
filter notation, trying to use the 'enlist' operator and the 'last' 
operator, and was able to make it work for a single tiddler (see below). 
But I think I am definitely missing something that ties it all together and 
makes it work for a batch. Any help would be appreciated. Bonus points if 
you can also tell me how to delete the words 'passive Perception ##' from 
the end of the 'senses' field. Thank you!

Code for a single tiddler:
<$list filter = "[{Boar!!senses}split[ ]last[1]]" variable = 'x'>

<<x>> <!-- this is so I could verify that the variable 'x' held the correct 
value -->

<$button set = "Boar!!passiveperception" setTo = <<x>> >
Change Boar's Passive Perception
</$button>

</$list>

Thank you!

-Jalen

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0c60d549-bc51-492c-bfaa-2ee1375064e6%40googlegroups.com.

Reply via email to