Adding multiple tags when creating tiddler from a template

Hy,

So, I have a series of “hub tiddlers” from where I create new tiddlers from templates via a button. I want these newly created tiddlers to have 3 tags. Theses tags are two values stored in fields, and the title of the “hub tiddler” from wich the new tiddler is created. I then use theses tags in filtered list.

Currently, I use this code as an action for the button:

\define testCreate()
<$action-createtiddler $basetitle={{!!NewName}} $template="Template1" tags={{!!Field 1}}{{!!Field 2}} >
    <$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
</$action-createtiddler>
\end

It do add the value of {{!!Field 1}} as a tag, but it ignore {{!!Field 2}}. {{!!Tittle}} never work.
I have been trying to store the fields as a variable first, and other things like that, but it just add no tag at all.
Is there a way to add multiple tags from multiple fields ? Including the current tiddler tittle ?

Alternatively, I though about using one single field with the three “futur tags” separated with spaces.
It add all of them as three different tags, but I want to avoid manually filling the three tags, to avoid typing errors. I want to use 2 drop-down list, plus the Hub-Tiddler’s tittle.
So I have been looking for a way to take theses three fields and store them into one single field, without success

I then tried to use a " tm-add-tag" as a secondary action for my button, but, again, no tags seems to be added as I pass them as variables.

How can I create a tiddler from a template and give it these 3 tags ?

Hi @TankinatorFR,

I think that you need the $tags attribute of action-listops. Likeso:

\define testCreate()
<$action-createtiddler $basetitle={{!!NewName}} $template="Template1" >
    <$action-listops $tiddler=<<createTiddler-title>> $tags="[{!!Field 1}] [{!!Field 2}]"/>
    <$action-sendmessage $message="tm-edit-tiddler" $param=<<createTiddler-title>>/>
</$action-createtiddler>
\end

<$button actions="<<testCreate>>">go</$button>
2 Likes