Try: <$visjstimeline filter="[<currentTiddler>get[filtre_domaine]compare:string:eq{!!filtre_institution}]" startDateField="date-debut" endDateField="date-fin" format="YYYY-MM-DD" groupField="institution" boxing="auto" navpad />
This requires a recent edition of TW since it uses the compare operator. Double braces (e.g. {{ and }} ) don't work inside of filters. They get reduced to single braces (as above). Text substitution only works inside of macros, so here instead I use the "get" operator to fetch the contents of the filtre-_domaine field and then compare it with the contents of filtre_institution. It's good practice to put your filter inside double quotes. This is a case where seeing a website would help -- setting up my own visjstimeline test site might take hours. Good luck! On Friday, April 16, 2021 at 7:28:49 AM UTC-7 jln wrote: > Hi, > > I've a field named "filtre_domaine" with value tag[AÀP] and a second one > named "filtre_institution" with value field:institution[CLARA] > > I would like to "inject" these values into a visjstimeline widget > > The following doesn't work : > > <$visjstimeline filter=[{{!!filtre_domaine}}{{!!filtre_institution}}] > startDateField="date-debut" endDateField="date-fin" format="YYYY-MM-DD" > groupField="institution" boxing="auto" navpad /> > > so I guess I've to create a macro to concatenate the fields values: > > \define concatenate_filter() [{{!!filtre_domaine}}{{!!filtre_institution}}] > > The "result" of the macro is fine: when I call <<concatenate_filter>> I > get > > tag[AÀP]field:institution[CLARA]] > and if I copy/paste this litteral result into the widget, the Gantt chart > is ok. > > But it doesn't work when I try to call the macro inside the widget: > > <$visjstimeline filter=<<concatenate_filter>> startDateField="date-debut" > endDateField="date-fin" format="YYYY-MM-DD" groupField="institution" > boxing="auto" navpad />. I get "Filter error: Missing [ in filter > expression" but I dont' undertand why… > > Thanks! > > -- 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/849f7f50-534a-4e0f-8e3f-99a786a9fb72n%40googlegroups.com.