This is the macro I have so far:
\define newHereButtonTags()
[[$(currentTiddler)$]]
\end
\define testWhy()
<$view tiddler=<<qualify "select-profile">>>
\end
\define newHereButton()
<$button>
<$action-sendmessage
$message="tm-new-tiddler"
title=<<testWhy>>
tags=<<newHereButtonTags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/chevron-up}}
</$list>
</$button>
\end
<$select tiddler=<<qualify "select-profile">> default=''>
<$list filter='[sort[title]tag[JustSOmeTags]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
<<newHereButton>>
<<testWhy>>
I created the dropdown list, it is correctly populated with the tags [justsomeTags]
What happens is that when I press the button <<newHereButton>>, it does indeed create a new draft widget, and it tags it automatically with the title of the $(currentTiddler)$.
However, for the life of me I can't figure out why the title of the draft is not getting fetched properly. What I am getting is something like: <$view tiddler=<<qualify "select-profile">>> as the title.
The ultimate goal is to have the title of the new tiddler to be: " title of the parent tiddler (the one that has the button)" + appended text based one what was selected using the selectWidget drop down list.
\define the-tags()
foo bar
\end
\define the-title()
$(currentTiddler)$ — $(selected)$
\end
\define create-new(title)
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title=<<the-title>>
tags=<<the-tags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-button}}
</$list>
</$button>
\end
<$select tiddler=<<qualify "$:/temp/select-profile">> default=''>
<$list filter='[tag[HelloThere]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
<$set name="state" value=<<qualify "$:/temp/select-profile">>>
<$set name="selected" filter="[<state>get[text]]">
<<create-new>>
</$set>
</$set>
\define the-tags()
foo bar
\end
\define create-new(title)
<$button>
<$action-sendmessage $message="tm-new-tiddler"
title=<<new-title>>
tags=<<the-tags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-button}}
</$list>
</$button>
\end
<$select tiddler=<<qualify "$:/temp/select-profile">> default=''>
<$list filter='[tag[HelloThere]sort[title]]'>
<option value=<<currentTiddler>>><$view field='title'/></option>
</$list>
</$select>
<$set name="state" value=<<qualify "$:/temp/select-profile">>>
<$set name="new-title" filter="[<currentTiddler>] — [<state>get[text]]" format="text">
<<create-new>>
</$set>
</$set>
Eventually, when all this is fixed and released, the SelectWidget documentation should show examples of how to actually use a selected option, e.g. in a macro as you do, rather than just show how it all writes some selected state to some state tiddler and how we can display that somewhere else.
Best wishes,— tb