Possible to Combine Two Fields?

75 views
Skip to first unread message

James

unread,
Jan 28, 2020, 9:24:11 AM1/28/20
to TiddlyWiki
Hi All,

I am struggling to combine the data from two fields into one.

I have developed form to create a new tiddler, the title of the new tiddler will be created based on the two fields users filled in the form.  For instance, users need to enter the DO number and Customer ID, then the new tiddler's title will be created in this format "[DO#:nnn] CUS-123".

Thanks,
James

Mat

unread,
Jan 28, 2020, 12:38:12 PM1/28/20
to TiddlyWiki
The standard technique for concatenation is to use macros, i.e at the top of the form tiddler (or in a separate tiddler tagged $:/tags/Macro) write

\define doid(dnr, cid) [DO#:$dnr$] CUS-$cid$

I'm making some assumption about the format described in your original post and also assuming that you know how to access the user set values.

In your form, where the new tiddler is created, you can now set the tiddler title to be the macrocall for doid.

Something along these lines at least. You might have to experiment a little but this is in the ballpark.

<:-)

James

unread,
Jan 30, 2020, 11:16:03 PM1/30/20
to TiddlyWiki
Thanks Mat.

It works.
Reply all
Reply to author
Forward
0 new messages