On Sunday, August 22, 2021 at 1:24:58 PM UTC-7 vpl wrote: > I'm trying to run the following code (at the end of the message) which > uses a variable called 'target' (that contains the current date) into a > filter called todayfilter > \define now_val() > <$vars now_date=<<now YYYY-0MM-0DD>>> > <$vars target={{{ [<now_date>] }}}> > <<target>> > <$vars todayfilter="[get[task_date]compare:string:eg[<target>]]"> >
Replace the first four lines of the macro with these three lines: <$vars target=<<now YYYY-0MM-0DD>>> <<target>> <$vars todayfilter="[<currentTiddler>get[task_date]match<target>]"> Notes: 1) Assign the date to the target variable in one step. There's no need for "now_date". 2) The filter needs <currentTiddler> preceding get[task_date], otherwise it will get the task_date value from *every* tiddler that has that field! 3) The compare "mode" should be "eq" (abbreviation of "equal") not "eg". 4) For a simple string comparison, you can use the "match" filter operator. Let me know how it goes, 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/282316f1-c673-4101-a6a7-d83e7dcdec2dn%40googlegroups.com.