On Sunday, July 11, 2021 at 2:07:23 PM UTC-7 [email protected] wrote:
> 1-can i have this macro work for 2 fields at the same time , so same
> button pushes an hour for 2 fields
>
Just replicate the code to adjust each field, like this:
<$button> add an hour
<$vars time={{!!field1}} offset="+01:00">
<$wikify name="newtime" text=<<adjust_time>>>
<$action-setfield field1=<<newtime>> />
</$wikify>
</$vars>
<$vars time={{!!field2}} offset="+01:00">
<$wikify name="newtime" text=<<adjust_time>>>
<$action-setfield field2=<<newtime>> />
</$wikify>
</$vars>
</$button>
> 2- can this work for all fields tagged a particular tag , so for example
> list all tiddlers matching a criteria , then one push of a button adds an
> hour to all listed tidlers
>
The code works with a field from the current tiddler, so if you put it
within a $list widget that finds all the desired tiddlers, it will update
all the tiddlers with one button push:
<$button> add an hour
<$list filter="[tag[sometag]]">
<$vars time={{!!somefield}} offset="+01:00">
<$wikify name="newtime" text=<<adjust_time>>>
<$action-setfield somefield=<<newtime>> />
</$wikify>
</$vars>
</$list>
</$button>
enjoy,
-e
--
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/26d5a786-a86b-4cb6-98a6-a5a346e78ebbn%40googlegroups.com.