It was part of the larger chunk of code that I was working on.  I separated 
this piece out, trying to get it to work.

On Thursday, May 28, 2020 at 7:08:53 AM UTC-5, Michael Manti wrote:
>
> TonyM,
>
> What role does the state macro play? I don't see it called anywhere.
>
> Thanks!
>
> Mike
>
> On Wednesday, May 27, 2020 at 11:57:38 PM UTC-4, TonyM wrote:
>>
>> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3e19d751-bca1-418d-b061-d5a45473621c%40googlegroups.com.

Reply via email to