Folks,
I have a tiddler containing a filter and I want to set the field used in the Advanced Search input field.
Looking in $:/core/ui/AdvancedSearch/Filter it would appear to be $:/temp/advancedsearch however once I navigate to the search it is not updated.
I believe the problem may be related to the need to edit the search input from the keyboard.
Can anyone suggest how to do this, ideally without modifying a core tiddler?
$:/temp/advancedsearch/input is the tiddler you want to update, though to ensure that the keyboard driven macro works correctly you may want to update $:/temp/advancedsearch as well.
I only now got to test this unfortunatly its still not working.
Not even the two named tiddlers are getting updated, or replacing whats alreadsy there;
<$button tooltip=<<tooltip>> message=tm-copy-to-clipboard param={{{ [all[current]get<filter-field>] }}} class=<<tv-config-toolbar-class>> dragFilter=<<filter-value>> >
<$list filter="[<modifier>match[ctrl]]" variable=~>
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value=<<filter-value>>/>
<$action-setfield $tiddler="$:/temp/advancedsearch" $value=<<filter-value>>/>
<$action-navigate $to="$:/core/ui/AdvancedSearch/Filter"/>
</$list>
{{$:/core/images/copy-clipboard}}{{$:/PSaT/filter-tools/filter-field-button/search-icon}}{{$:/PSaT/filter-tools/filter-field-button/drag-icon}} <<filter-field>>
</$button>
The following occurs
- The click copied the filter to the clipboard
- The Drag drags the tiddler to another tiddlywiki
- The ctrl-click copied the filter to the clipboard,
- does not change the contents of $:/temp/advancedsearch/input
and $:/temp/advancedsearch
- Does not navigate to $:/core/ui/AdvancedSearch/Filter
My guess is there is a stray character I just can’t see.
This works just fine on tiddlywiki.com:
<$button actions="""
<$let filter-value="abc">
<$action-setfield $tiddler="$:/temp/advancedsearch/input" $value=<<filter-value>>/>
<$action-setfield $tiddler="$:/temp/advancedsearch" $value=<<filter-value>>/>
<$action-navigate $to="$:/core/ui/AdvancedSearch/Filter"/>
</$let>""">test</$button>
I will put all the actions behind the actions= tomorrow and see if that fixes it. Thank you.
I have since found this feature built in to tiddlywiki and as a result made a macro global and generalised it further.
Please see [RFC] Search-filter-button and show-filter-count (and search button)