It's hard to diagnose at a distance. But as you can see in the screenshot, 
it's working on mine. Possibly something got mangled when you copied the 
code?

You could download your tiddler set in a JSON bundle, and then post them 
here.



On Sunday, December 27, 2020 at 1:10:55 PM UTC-8 [email protected] 
wrote:

>
> Thanks Mark
>
> I've had a go using your code, but I'm still getting the same behaviour. 
> Any ideas?
>
> Joseph
>
>
> On Sunday, 27 December 2020 at 19:28:47 UTC Mark S. wrote:
>
>> The reason it doesn't work is because when you put [[MySingleWordTag]] in 
>> tags, TW strips off the [[ and ]], so your text no longer matches.
>>
>> The following worked in my tests. It uses the filter run evaluation to 
>> determine if braces need to be added, only adding them if there is more 
>> than one word.
>>
>> <$vars myfilter="[split[ ]count[]compare:integer:eq[1]]" lf="[[" rt="]]" >
>>
>> <$select field='tags'>
>> <$list 
>> filter='[_object_type[location]!title<currentTiddler>!tag<currentTiddler>]'>
>> <option value={{{ [<currentTiddler>filter<myfilter>] 
>> [<currentTiddler>addprefix<lf>addsuffix<rt>]+[first[]] }}}><$view 
>> field='title'/></option>
>> </$list></$select>
>>
>> </$vars>
>>
>>
>> On Sunday, December 27, 2020 at 9:10:26 AM UTC-8 [email protected] 
>> wrote:
>>
>>> Hello all
>>>
>>> I've got a select widget set up in the body of a tiddler to choose that 
>>> tiddler's tag from a list of other tiddlers, in order to facilitate easy 
>>> moving around within a table of contents. The widget is set up as follows:
>>>
>>> *<$select field='tags'><$list 
>>> filter='[_object_type[location]!title<currentTiddler>!tag<currentTiddler>]'><option
>>>  
>>> value=<<linkup>>><$view field='title'/></option></$list></$select>*
>>>
>>> *_object_type* is a custom field I've set up, and "location" is one of 
>>> its possible values. *<<linkup>>* is seperately defined as:
>>>
>>>
>>> *\define linkup() [[$(currentTiddler)$]]*
>>>
>>> The linkup macro is used to make sure the tags are applied correctly for 
>>> tiddlers in the list with spaces in their names. 
>>>
>>> The strange issue I'm having however, is that once I choose an option in 
>>> the dropdown box, it only remains displayed visually in the box  *if 
>>> the name contains spaces*. If it does not, then the dropdown box 
>>> appears to be empty (though the tag is still applied correctly). 
>>>
>>> This is mostly a cosmetic issue, but one I'm curious about and would 
>>> love to know if anyone understands this behaviour, as ideally I'd like the 
>>> box to continue to display whatever has been selected.
>>>
>>> Many thanks in advance if anyone knows what's going on here.
>>>
>>> Joseph
>>>
>>

-- 
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/7d7a9bf2-765f-47e5-84cb-693356ed3471n%40googlegroups.com.

Reply via email to