On Sunday, March 31, 2019 at 7:46:22 AM UTC-7, Jeremy Ruston wrote: > > Perhaps it would be clearer expressed as a series of examples... >
Here's my take on examples plus a little bit of re-arranging and editing of Jeremy's descriptions... > 1. If the "tiddler" attribute is present, get the text of the tiddler, or the > value of the "emptyValue" attribute if the text field is blank or missing > <$set name="myvar" tiddler="SomeTiddler" emptyValue="sometext"> > 1a. If the "subtiddler" attribute is present, get the text of the > subtiddler from the specified tiddler, or the value of the "emptyValue" > attribute if the subtiddler text is blank or missing > <$set name="myvar" tiddler="SomeTiddler" subtiddler="SomeSubTiddler" emptyValue="sometext"> 1b. If the "field" attribute is present, get the value of that field, or > the value of the "emptyValue" attribute if the field is blank or missing <$set name="myvar" tiddler="SomeTiddler" field="somefield" emptyValue="sometext"> 1c. If the "index" attribute is present, get the value of the specified > index, or the value of the "emptyValue" attribute if the index is blank > or missing > <$set name="myvar" tiddler="SomeTiddler" index="somefield" emptyValue="sometext"> > 2. If the "filter" attribute is present and not blank, return the entire > filter results using double square brackets quoting around any results that > include spaces > <$set name="myvar" filter="[somefilter[]]"> > 2a. If both the "filter" attribute and the "value" attribute are present > and the filter results are not empty, return the value of the "value" > attribute, otherwise return blank > <$set name="myvar" filter="[somefilter[]]" value="somevalue"> > 2b. If both the "filter" attribute and the "emptyValue" attribute are > present, return the entire filter results using double square brackets > quoting around any results that include spaces, or the value of the > "emptyValue" attribute if the result is empty > <$set name="myvar" filter="[somefilter[]]" emptyValue="sometext"> > 2c. If the "filter" attribute, the "value" attribute, and the "emptyValue" > attribute are present, return the value of the "value" attribute, or the > value of the "emptyValue" attribute if the result is empty > <$set name="myvar" filter="[somefilter[]]" value="somevalue" emptyValue="sometext"> > 2d. If both the "filter" attribute and the "select" attribute are present > and the "select" attribute is a valid number "N", return the "Nth" result > from the filter > <$set name="myvar" filter="[somefilter[]]" select="3"> > 3. If neither the "tiddler" or "filter" attributes are provided, return > the value of the "value" attribute, or the value of the "emptyValue" > attribute if the "value" attribute is blank or missing > <$set name="myvar" value="somevalue" emptyValue="sometext"> -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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/971424d3-11d6-4a33-ac83-8b07a53cdc86%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

