On Tuesday, September 22, 2020 at 4:46:26 PM UTC-7, Simon wrote:
>
> I have set a time stamp
> <$set name="timestamp" value="<<now YYYY0MM0DD000000000>>">
> <$reveal type='lt' state='!!gsd_duedate' text='<<timestamp>>' >
> I have tried single angle brackets: <timestamp>, double angle 
> <<timestamp>>, {{!!timestamp} and {!!timestamp} - all to no avail
>

When specifying a widget parameter, the enclosing syntax is used to 
indicate the kind of parameter parsing to use:

   - "..." (or '...' or """...""" or [[...]]) is for literal values
   - <<...>> is for variables/macros
   - {{...}} is for tiddler/field references
   - {{{ [...] }}} is for filters

Thus, since <<now ...>> is a macro, and <<timestamp>> is a variable, they 
should not be enclosed in quotes:
<$set name="timestamp" value=<<now YYYY0MM0DD000000000>>>
<$reveal type='lt' state='!!gsd_duedate' text=<<timestamp>> >

Note that for simple assignments, you can use <$vars> instead of <$set>
<$vars timestamp=<<now YYYY0MM0DD000000000>>>
<$reveal type='lt' state='!!gsd_duedate' text=<<timestamp>> >

The advantage of <$vars> is that you can do multiple variable assignments 
in a single widget:
<$vars foo="literal" bar=<<macro>> baz={{!!field}} mumble={{{ [filter] }}}>

Note that the {{{ [filter] }}} syntax will only return one item from the 
filter (the *first* item).
To assign the results of a filter with multiple items, use <$set> with the 
"filter" parameter, like this:
<$set name="foo" filter="[...]">
also, you can use <$set> to perform "conditional assignment":
<$set name="foo" filter="[...]" value="has a result" emptyValue="no 
results">
If the filter returns a result, the specified value is used, if the filter 
returns no result, the emptyValue is used.

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/bbc88199-59d1-45ee-b9cb-8c128593eed7o%40googlegroups.com.

Reply via email to