Lisa Quick tip: Wrapping even a list that contains actions widgets with a button is sufficent to trigger that action for every item in the list.
\define journalTiddlerName( ) $(when)$ $(project)$ \define state() $:/state/$(currentTiddler)$ \define createTodaysEntry() <$action-createtiddler $basetitle="$(journalTiddlerName)$" tags="journal $(project)$" project=$(project)$ description="$(description)$" /> \end <$vars project={{!!project}} description={{!!description}} when=<<now DD-MMM -YYYY>> > <$button> <$list filter="[title<journalTiddlerName>] +[is[missing]] +[limit[1]]"> <<createTodaysEntry>> </$list> Create <<journalTiddlerName>> </$button> </$vars> Note that I changed the reference to $basetitle="$(journalTiddlerName)$" Perhaps you could add https://tiddlywiki.com/#ActionNavigateWidget to open the tiddler as well. FYI when you use a value in the current tiddler to create a new one with the same values such as project I have started calling this "in context", I plan to release a "context tool" one day. Regards Tony On Thursday, May 28, 2020 at 12:54:55 PM UTC+10, Lisa Wasserman wrote: > > I'm still trying to automatically create a new tiddler if one of the > required title doesn't exist. My existing code is as follows: > > \define journalTiddlerName( ) $(when)$ $(project)$ > \define state() $:/state/$(currentTiddler)$ > \define createTodaysEntry() > <$action-createtiddler $basetitle=<<journalTiddlerName>> tags="journal > $(project)$" project=$(project)$ description="$(description)$" /> > \end > > <$vars project={{!!project}} description={{!!description}} when=<<now > DD-MMM-YYYY>> > > <$list filter="[title<journalTiddlerName>] +[is[missing]] +[limit[1]]"> > <<createTodaysEntry>> > </$list> > </$vars> > > While I could get the list widget to display different strings, dependent > on whether the tiddler existed, I could not create a new tiddler. After a > little reading, it seems that Action Widgets need to be triggered > specially. Is there a simple method that I can use to trigger my > action-createtiddler, inside of my list widget? I don't want to have to > press a button, when I always want to create a tiddler if it doesn't > already exist. > > > -- 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/9a691eac-9015-49d3-a4f8-c0adc3635762%40googlegroups.com.