If you are using the code as in @satikusala’s TBX’s “Collect Children” stamp:
$Text=collect(children,$Text).replace(";","\n");
Without being able to see the code causing your mistake, the likely cause is you omitting the .replace()
step.
In the demo file above, we have 3 notes with respective Text: " Note 4 Text.“, “Note 2 Text.”, and Note 3 Text.”.
Using a stamp like below on Note:
$Text=collect(children,$Text);
creates $Text of:
Note 4 Text.;Note 2 Text.;Note 3 Text.
Why? Because collect() returns a list of value as List-type data. Lists and Set data are essentially a String but with a semi-colon between each list item. Thus if $MyList contains values “A”, “B” and “C”, it is stored as the string A;B;C
.
Sure enough when we pass the output of collect()
to $Text, is is like doing an action:
$MyList = collect(children,$Text);
$Text = $MyList;
This forces Tinderbox to ask, what do I do with List data? As it is essentially a string, $Text now holds the literal stored string content of the list.
The point of the format("formatString")
us to tell Tinderbox, give me the list with the list delimiters (the semicolons) replaced by the characters in the formatString
argument. The most common list-to-string choices are ", " for a coma+space list, e.g. “A, B, C” or “\n” where each item becomes a separate line/paragraph as in:
A
B
C
It is the latter one (.format("\n")
that I think you want, as used in @satikusala’s demo above.