Hi Thomas
No need to use an extra line to clear the field -- use the $filter=
parameter directly -- this will overwrite the contents of the field.
<$action-listops $field="todo-done" $filter=<<now YYYY0MM0DD0hh0mm0ss>>/>
This could be used to update a timestamp with each click, for example.
regards
On Friday, 19 August 2016 09:00:16 UTC+2, Thomas Elmiger wrote:
>
> Hi Matabele
>
> Thank you for the input, when I took a look at the ActionListops widget, I
> did not realise the possibility to add and remove tags at the same time.
> This makes my code much simpler indeed!
>
> I did not copy your exact solution as the action-setfield still would need
> the FieldMangler (ActionListops doesn’t). At the moment my macro looks like
> this:
> \define todoBtnDone(remove,class:"")
> <$set name="btnclass" value="todo-btn-invisible $class$">
> <$button class=<<btnclass>> tooltip="This is done">
> <$action-listops $tags="ToDoDone -$remove$"/>
> <$action-listops $field="todo-done" $subfilter=<<now YYYY0MM0DD0hh0mm0ss>>
> />
> {{$:/core/images/full-screen-button}}
> </$button>
> </$set>
> \end
>
> Important: This appends done-dates instead of deleting former values … I
> am not sure yet, if this is useful, so I leave it like that. To go back to
> only one date I would clear the field like this:
> <$action-listops $field="todo-done" $filter="[[]]"/>
>
> Thanks again and have a nice day!
> Thomas
>
>
>
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/69314547-7dc4-4c76-bdf1-9e7b12050abe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.