Set Tiddler Title from fields

70 views
Skip to first unread message

Glenn Dixon

unread,
Dec 28, 2020, 1:32:32 PM12/28/20
to TiddlyWiki

I'm experimenting. So far I have been able to take input from three fields, assign them to $:/state... and then press a button which creates a new tiddler. The new tiddler contains three fields w/ the content I originally entered as values.

But how can I merge these three fields and make *that* the title of the new tiddler?

This is the part that has so far eluded me...

Assume the fields are firstname, middlename, lastname...

Mark S.

unread,
Dec 28, 2020, 1:45:11 PM12/28/20
to TiddlyWiki
You don't mention which approach you are using to create the tiddler. But if it were action-createtiddler, then your $basetitle attribute might look like this:

... $basetitle={{{ [{!!firstname}addsuffix{!!middlename}addsuffix{!!lastname}] }}} ...

Glenn Dixon

unread,
Dec 28, 2020, 2:14:15 PM12/28/20
to TiddlyWiki
Thank you sir! I have now officially tried 175 different combinations of brackets and action-options! lol

I had not seen the addsuffix before. I just tried several variations of it, all of which break everything when I attempt to add spaces between names. Is there a simple/easy way of accomplishing this? Worst case I will leave it as is and the names will be squished (FirstMiddleLast) but spaces would be better, as long as it does not involve trigonometry...

Eric Shulman

unread,
Dec 28, 2020, 2:24:10 PM12/28/20
to TiddlyWiki
On Monday, December 28, 2020 at 11:14:15 AM UTC-8 dix...@gmail.com wrote:
I had not seen the addsuffix before. I just tried several variations of it, all of which break everything when I attempt to add spaces between names. Is there a simple/easy way of accomplishing this? Worst case I will leave it as is and the names will be squished (FirstMiddleLast) but spaces would be better, as long as it does not involve trigonometry...

Try this:
$basetitle={{{ [{!!firstname}] [{!!middlename}] [{!!lastname}] +[join[ ]] }}}

enjoy,
-e


Mark S.

unread,
Dec 28, 2020, 2:27:02 PM12/28/20
to TiddlyWiki
Just add them with addsuffix

$basetitle={{{ [{!!firstname}addsuffix[ ]addsuffix{!!middlename}addsuffix[ ]addsuffix{!!lastname}] }}} ...

In case Google breaks these lines, the new, added addsuffix operators have a space inside them.
On Monday, December 28, 2020 at 11:14:15 AM UTC-8 dix...@gmail.com wrote:

Glenn Dixon

unread,
Dec 28, 2020, 2:39:22 PM12/28/20
to TiddlyWiki
that did it! A separate 'addsuffix' for each space. Not sure I would have come up with that. Thanks, again!

Now to set up blanks for the other 10 fields...

Glenn Dixon

unread,
Dec 28, 2020, 2:42:31 PM12/28/20
to TiddlyWiki
Eric,

Just saw your 'join' idea - looks like a lot less typing. Might not make any difference at this point, but I have several other fields to fill, and (this is where I bite off more than I can chew) that would come in handy if I want to display a more narrative text instead of just basic table layout. Thanks for this option!
Reply all
Reply to author
Forward
0 new messages