On Friday, December 17, 2021 at 7:54:00 AM UTC-8 sheri...@gmail.com wrote: > ``` > <$vars prefix="[[" suffix=" ]]"> > <$list filter="[[smpConfig]get[animals]trim:prefix[<prefix>]]"/> > </$vars> > ``` > If I don't have the trim part then the output is: [[Fox ]] [[Beaver ]]... > all good but once the trim is added there is no output. > So what silly error am I making? >
A couple of things: 1) The brackets surrounding a filter operand are actually part of the operand itself, and indicate the kind of operand to process: * square brackets enclose literal values * angle brackets enclose variable references * curly braces enclose tiddler references Thus, you want to write: `trim:prefix<prefix>` instead of `trim:prefix[<prefix>]` 2) The `get[foo]` syntax returns the value in the field named "foo" **as a single block of text**. To handle the retrieved value as a space-separated, bracketed list of items, you should use the `enlist-input[]` filter operator, like this: `<$list filter="[[smpConfig]get[animals]enlist-input[]"/>` 3) Your example list, retrieved from the field named "animals", seems to include trailing space for each animal name. I suggest omitting the extra spaces in the field content. Alternatively, you can use `trim:suffix[ ]` in your filter, like this: `<$list filter="[[smpConfig]get[animals]enlist-input[]trim:suffix[ ]]"/>` enjoy, -e -- 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5c69419f-7444-4337-8f67-540795631edbn%40googlegroups.com.