Hi, Thanks a lot; I agree for 1), 3) and 4) But for point 2) in fact what I need to do is the following code <$vars now_date=<<now YYYY-0MM-0DD>>> <<target>> <$vars todayfilter="[get[task_date]match<target>]"> <$list filter="[regexp[db___]!sort[task_start_time]filter<todayfilter>]"> <tr> <td><$link><$view field="task_date"/></$link></td> <td><$view field="tags"/></td> <td><$view field="task_comment"/></td> <td><$view field="task_start_time"/></td> <td><$view field="task_end_time"/></td> </tr> </$list> </tbody></table>
I use the *filter *operator into the list as I want to filter the tiddlers based on the *task_date * field For each of the filtered tiddlers I display the fields in the table If I put the "get[task_date]" directly into my final filter like that (<$list filter="[regexp[db___]!sort[task_start_time] [get[task_date]match<target> ">) I do not have the tiddler fields to display More, When I try the below code I get a Tiddler exception (attached in my previous post ...) Is there a bug in the *filter *operator or something wrong I'm doing ? Regards Le lundi 23 août 2021 à 13:45:27 UTC+2, Eric Shulman a écrit : > 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/6867f42a-98bb-4fed-b101-44b1ebb82ec6n%40googlegroups.com.