On Monday, December 25, 2017 at 3:20:03 PM UTC-8, David Allen wrote:
>
> That's helped to a degree, but I'm wondering if I could modify the code 
> somehow to prevent the filter from being evaluated until the button is 
> pressed?
>

Use the $button params set and setTo to change a flag value... then, use a 
$reveal wrapped around the costly $set and $action-setfield code, so that 
it is only rendered after the button is pressed.  Try the following code 
and let me know if it works for your use-case.

-e

<$button to="Good Tumblr" set="Sandbox_Retrieve!!calcfilter" setTo="show" 
class="tab_button">Good
<<set_timefields>>

<$reveal state="Sandbox_Retrieve!!calcfilter" type="match" text="show">

<$set name="goods" filter="[tag[tumblr]!year{Sandbox_Retrieve!!year}] 
[tag[tumblr]year{Sandbox_Retrieve!!year}!month{Sandbox_Retrieve!!month}]+[category[good]!prefix[Template]sort[modified]!has[format]!has[improve]limit[5]]">
<$action-setfield $tiddler="Sandbox_Retrieve" $field="goods" $value=<<goods>> 
/>
</$set>

</$reveal>

</$button>

-- 
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/afe2a3a5-2159-4d43-8d3d-f352ddee3811%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to