Mat,

Mohammad used a macro to do the concatenation of values and Mark used the 
triple curly braces to use a filter to do the concatenation. These are both 
good methods

   - In some cases the macro approach will need the result be be 
   wikifiy[ed] before use
   - In other cases the triple curly braces approach may need to be wrapped 
   in <$text text={{{ filter }}} /> to have the result as plain text.

I have started to document this 
here 
https://anthonymuscio.github.io/#%E2%9D%BD%20%20Joining%20values%20with%20concatenation
and 
also https://anthonymuscio.github.io/#%E2%9D%BB%20Filtered%20transclusions

I am confident we can develop a clearer approach to concatenation as well 
as document it further. My personal preference at the moment is the {{{ 
filter }}} method as long as you feel comfortable with filters,  this is 
because you can do the "concatenation" at the last possible movement, 
although it could have performance consequences.

Regards
Tones

On Wednesday, 28 April 2021 at 05:54:17 UTC+10 Mat wrote:

> Guys, thank you! I'll look closer at it tomorrow but I'm pretty sure your 
> solutions will solve it! Thank you.
>
> <:-)
>
> On Tuesday, April 27, 2021 at 9:45:29 PM UTC+2 Mark S. wrote:
>
>> Just for variety
>>
>> \define newtid()
>> <$vars lb="[[" rb="]]" spc=" ">
>> <$button> click
>> <$action-createtiddler $basetitle={{temp!!ttl}}  
>> tags={{{[{temp!!tgs}addsuffix<rb>addsuffix<spc>addsuffix<lb>addsuffix<currentTiddler>addprefix<lb>addsuffix<rb>]}}}
>>   
>>    />
>> </$button>
>> </$vars>
>> \end
>>
>> <$edit-text tiddler=temp field=tgs/>
>>
>>
>> On Tuesday, April 27, 2021 at 11:55:38 AM UTC-7 Mohammad wrote:
>>
>>> Hi Mat
>>>
>>> This is one quick solution
>>>
>>> \define mytags() [[$(tag1)$]] $(tag2)$
>>> \define newtid()
>>> <$button> click
>>> <$vars tag1=<<currentTiddler>> tag2={{temp!!tgs}}>
>>> <$action-createtiddler $basetitle={{temp!!ttl}}  tags=<<mytags>> />
>>> </$vars>
>>>
>>> </$button>
>>> \end
>>>
>>> <$edit-text tiddler=temp field=ttl/>
>>>
>>> <$edit-text tiddler=temp field=tgs/>
>>> <<newtid>>
>>>
>>>
>>> * the mytags macro makes a substitution so with the help of $vars it 
>>> returns the wikified values
>>> * in the second inputbox you can enter xx yy to add two tags at the same 
>>> time
>>> * if your tag has space in name use [[my tag with space]] xx yy This 
>>> will add all three tags plus currentTiddler
>>> * If you always want to enter one tag including those with space then 
>>> correct the mytags macro as below
>>> \define mytags() [[$(tag1)$]] [[$(tag2)$]]
>>>
>>>
>>>
>>> Best wishes
>>> Mohammad
>>>
>>>
>>> On Tue, Apr 27, 2021 at 10:22 PM Mat <[email protected]> wrote:
>>>
>>>> I wish to create a new tiddler using action-createtiddler (because it 
>>>> uses the "basetitle" to prevent overwrites). I define the title and tags 
>>>> values via a temp tiddler in some EditTextWidgets, as you see below.
>>>>
>>>> But I want the new tiddler tags to be both this arbitrary temp!!tgs 
>>>> value AND and the title of the current tiddler (i.e {{!!title}}). The 
>>>> temp!!tgs value is not surrounded by brackets and it may contain 
>>>> spaces. The current tiddlers title is a normal tiddler title.
>>>>
>>>> I'd appreciate any help on how I can set the tags here?
>>>>
>>>> \define newtid()
>>>> <$button> click
>>>> <$action-createtiddler $basetitle={{temp!!ttl}}  tags=????????/>
>>>> </$button>
>>>> \end
>>>>
>>>> <$edit-text tiddler=temp field=ttl/>
>>>> <$edit-text tiddler=temp field=tgs/>
>>>> <<newtid>>
>>>>
>>>> <:-)
>>>>
>>>> -- 
>>>> 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/30d188db-9d29-43c4-8bfa-1b184c46411fn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/tiddlywiki/30d188db-9d29-43c4-8bfa-1b184c46411fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>

-- 
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/fe04f502-cca6-4a50-9b06-0f93ff32b874n%40googlegroups.com.

Reply via email to