I have a somewhat complicated filter that pulls in data from multiple tiddler sources and produces the input for a macro I’m using addsuffix… and that works.
I’d like to extend that to a list.
I may just be brain-dead. How do I concatenate all of the runs of a list into a variable?
Old:
I’m collecting a bunch of inputs to a statistics function : # of tests, # of outcomes, threshold, quality; subordinate function inputs - tests, possible paths, threshold, quality from fields in two groups of tiddlers identified bu different tags.
In the working version, I addsuffix[] them all together and pass them to a macro as a formatted string.
New:
In the not-working version, I’d like to perform statistics on the entire group, instead of individual analyses.
I have a new tiddler called “group” which two lists, the subordinate nested inside the primary. The addsuffix[] filter is inside the inner list. I’ve added a comma to join the records. This produces a string that looks right for the statistics macro.
To pass the string into the macro, I’ve created a new “test” tiddler and have $set a variable “item” with the value of “[[group]text]”.
The value looks right when I try to examine it with <<item>> in the “test” tiddler; but if I try to pass it to the macro with $macrocall arg={{{[<item>]}}} the macro complains that it’s just been fed a bunch of markup, not the string it’s expecting.
[edited] To place backticks around some code examples TW_Tones
This is actually the purpose of the $wikify widget (hence its name): it lets you put the result of what is produced by your wikitext (typically inside a procedure) into a variable, for later reuse. See definition and examples here: https://tiddlywiki.com/#WikifyWidget
Since you were struggling with concatenating via addsuffix, perhaps you just mean this kind of trick:
<$let string={{{ [<currentTiddler>] has this that [[the other]] on TiddlyWiki [<version>addprefix[v]] =on [{!!created}format:date[MMM 0DD]] +[join[ ]] }}}>
<<string>>
</$let>
(Note if there’s any risk of duplicate values, putting = immediately before later values makes sure that those later duplicate values are not removed.)