That worked beautifully, thank you! I also liked the alternative, terser way of doing things. So, thank you for both bits.
On Thursday, March 18, 2021 at 1:21:19 PM UTC+2 Eric Shulman wrote: > On Thursday, March 18, 2021 at 2:55:41 AM UTC-7 [email protected] wrote: > >> <$set name="bookCount" filter="[author{!!title}count[]]"> >> <$reveal type="eq" default=<<bookCount>> text=0> No books </$reveal> >> <$reveal type="eq" default=<<bookCount>> text=1> <<bookCount>> book >> </$reveal> >> <$reveal type="gt" default=<<bookCount>> text=1> <<bookCount>> books >> </$reveal> >> </$set> >> The above works but only for more books than 1 (the final, `gt` clause). >> If it's 0 or 1 books, nothing is returned. >> What am I missing? >> > > Use type="match", not type="eq" > > Also, here's an alternative way to get the same output, using "inline > filters": > <$set name="bookCount" filter="[author{!!title}count[]]"> > <$text text={{{ [<bookCount>match[0]then[No]else<bookCount>] }}} /> > <$text text={{{ [<bookCount>!match[1]then[books]else[book]] }}} /> > </$set> > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d5c669e6-d8a4-4c6a-b17d-7a18d10dd492n%40googlegroups.com.

