Hi everyone,
I’m trying to add new tags to existing Tiddlers that already have other tags, using an action triggered by a button. However, the new tags are not being added to the Tiddlers.
I would appreciate any help to correct the code.
Thanks in advance
Rosi
<!-- Define temporary tiddler titles -->
\function f.tempSwot() $:/temp/rosi/new-tiddler-swot
\function f.tempIndicImpact() $:/temp/rosi/new-tiddler-indicimpact
<!-- Function to "get" multiple tags -->
\function f.getNewTags() [<f.tempSwot>get[text]] [<f.tempIndicImpact>get[text]] [<currentTiddler>get[tags]trim[]]
<!-- Helper procedures -->
\procedure deleteTempTiddlers()
<$action-deletetiddler $filter="[prefix[$:/temp/rosi/]]" />
\end
\procedure newTagsActions()
<$action-addTags
tiddler = <<currentTiddler>>
tags= <<f.getNewTags>>
>
</$action-addTags>
<!-- delete all temporary tiddlers -->
<<deleteTempTiddlers>>
\end
<!-- Filtro para selección todos los Tiddler con el tag 'Constraint' -->
<$list filter="[all[current]tag[Constraint]]">
<div class="tw-costs-edit-fields" style="margin-top: 1em; padding: 0.5em; border-left: 4px solid #ccc;">
<!-- Dropdown para seleccionar una etiqueta sobre el tipo de elemento del SWOT -->
Choose a SWOT element type:
<$select tiddler=<<f.tempSwot>> field="text" default="">
<option disabled>Choose an option</option>
<option value="">-none-</option>
<option value="Strength">Strengths</option>
<option value="Weakness">Weaknesses</option>
<option value="Threat">Threats</option>
<option value="Opportunity">Opportunity</option>
</$select>
Choose an element type:
<$select tiddler=<<f.tempIndicImpact>> field="text" default="">
<option disabled>Choose an option</option>
<option value="">-none-</option>
<option value="Indicator">Indicators</option>
<option value="ExpectedImpactPositive">Expected Impact (Positive)</option>
<option value="ExpectedImpactNegative">Expected Impact (Negative)</option>
</$select>
<!-- Botón para crear el tiddler con ese nombre -->
4. Press the button
<$button actions=<<newTagActions>>
>
Create new tag
</$button>