Good luck N P, I see your code works now!

Cheers
Mohammad

On Saturday, April 25, 2020 at 5:07:43 PM UTC+4:30, N P wrote:
>
> Hi Mohammad,
>
> While normally I would agree.  However, my task titles are simply the 
> YYYY-MM-DD of the day I created them.  This is because I leverage the 
> caption field to allow quick changes to the task name.
> [image: tasks.JPG]
>
>
>
> Once I archive my task, the assumption is no more edits will occur and I 
> can file it.  So I change the name to a concatenation of `$completed$ 
> $caption$`.  Now when I use TiddlyWiki's built in search textbox, the tasks 
> show up with information and not just `YYYY-MM-DD`
>
> Thank you for the link, I had no idea when I was changing the title, 
> another tiddler was being created.  Here is what I have that will work.  I 
> might try to include a prompt for myself to confirm the rename. This way I 
> can see the empty tiddler before I copy into it and delete the original.
>
> * $:/user/button/ArchiveTask*
> \define archiveHere()
> $(currentTiddler)$
> \end
>
> \define archiveHereButton(completed caption)
> <$button tooltip={{$:/user/button/ArchiveTask/Hint}} 
> class=<<tv-config-toolbar-class>> param=<<archiveHere>> >
> <!-- append archive tag -->
> <$action-listops $tiddler=<<archiveHere>> $tags="+[append[task-archive]]" 
> />
> <!-- open the target tiddler that will be created during the rename-->
> <$action-navigate $to="$completed$ $caption$" />
> <!-- renaming tiddler will create a new one with existing content -->
> <$action-setfield $tiddler=<<archiveHere>> title="$completed$ $caption$" />
> <!-- delete the original -->
> <$action-deletetiddler $tiddler=<<currentTiddler>> />
>
> {{$:/core/images/chevron-down}}</$button>
> \end
>
> <!-- 2020-04-24 call macro and pass the fields to concatenate as new title 
> of task -->
> <$macrocall $name="archiveHereButton" completed={{!!completed}} 
> caption={{!!caption}}/>
>
>
>
> On Friday, April 24, 2020 at 1:32:42 AM UTC-4, Mohammad wrote:
>>
>> Think Tiddlywiki way! Why to change the title? You can
>> tag tiddler done, you can have a completion field and add your data there!
>> renaming a tiddler is not a good choice.
>>
>> By the way, Eric Shulman has given the complete solution for renaming 
>> tiddlers here:
>>
>> https://groups.google.com/d/msg/tiddlywiki/oMBoAkJIZhQ/mTlPv3FbEQAJ
>>
>> You can also use TW-Scripts
>>
>> --Mohammad
>>
>>
>> On Friday, April 24, 2020 at 8:59:13 AM UTC+4:30, N P wrote:
>>>
>>> Hello,
>>>
>>> I've been searching for a few days and came up short.  How do you rename 
>>> a tiddler?  The documentation shows WidgetMessage tm-rename-tiddler 
>>> <https://tiddlywiki.com/#WidgetMessage%3A%20tm-rename-tiddler>, however 
>>> that is destructive and leaves you with a fresh tiddler with a new name.
>>>
>>> I've tried some variations of the below and came up short in my macro 
>>> testing
>>>
>>> <$action-setfield $tiddler="New Tiddler 2" $field="title" $value="New 
>>> Name" />
>>>
>>> My use case is, I have created a personal task management workflow. When 
>>> I archive my tasks, I want to change the the Title of the Tiddler to a 
>>> combination of Completed date field and Caption field.
>>>
>>> Here is my archive button for reference
>>>
>>> \define archiveHere()
>>> $(currentTiddler)$
>>> \end
>>>
>>>
>>> \define archiveHereButton(completed caption)
>>> <$button tooltip={{$:/user/button/ArchiveTask/Hint}} class=<<tv-config-
>>> toolbar-class>> param=<<archiveHere>> >
>>> <$action-listops $tiddler=<<archiveHere>> $tags=
>>> "+[append[task-archive]]" />
>>> <$action-setfield $tiddler=<<archiveHere>> title="$completed$ $caption$" 
>>> />
>>> {{$:/core/images/chevron-down}}</$button>
>>> \end
>>>
>>>
>>> <!-- 2020-04-24 call macro and pass the fields to concatenate as new 
>>> title of task -->
>>> <$macrocall $name="archiveHereButton" completed={{!!completed}} caption
>>> ={{!!caption}}/>
>>>
>>>
>>> Thank you,
>>> Mick
>>>
>>>

-- 
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/eecdd15a-0681-43cf-8722-badca727181e%40googlegroups.com.

Reply via email to