I tried that code... Main interest is for the HD field. Didn't work.
Don't know what I did wrong. I copied the exact line into my code but I go
nothing. It stopped giving any results at all... blank page.
On Wednesday, 11 December 2019 20:07:36 UTC-4, PWL wrote:
>
> That is exactly what I am looking for. And now I am staring at the code
> trying to figure out how to make it work with what I have. I suck at this
> crap. Probably why I became an electronics Tech, not technologist. Anyway
> here is what my code looks like now.
>
> Search by <$select tiddler="$:/temp/searchfilter" default="Choose"
> tag="input">
> <option value="Choose">-Choose one-</option>
> <option
> value="[has[intelligence]search:intelligence{$:/temp/mysearch}]">Intelligence</option>
> <option
> value="[has[climate_terrain]search:climate_terrain{$:/temp/mysearch}]">Climate/Terrain</option>
> <option value="[has[hd]search:hd{$:/temp/mysearch}]">HD</option>
> </$select>
> <$edit-text tiddler="$:/temp/mysearch" tag="input" />
>
> <$macrocall $name="list-links" filter={{$:/temp/searchfilter}} />
> @@.fourcolumns
> <div class="tc-table-of-contents">
> @@
>
> On Tuesday, 10 December 2019 20:43:00 UTC-4, Eric Shulman wrote:
>>
>> On Tuesday, December 10, 2019 at 4:11:33 PM UTC-8, Mark S. wrote:
>>>
>>> For the 2nd part, wrap the lookup macro with a list that uses a
>>> minlength operator:
>>>
>>
>> I don't think that's what he is trying to achieve... he said he *wants*
>> to search for single character input, but only get results for which that
>> character occurs in isolation:
>>
>> in his initial question, PWL wrote:
>>
>>> when I try to search a single character it returns every entry with that
>>> particular character in it even if it is part of a series or another
>>> number. I want to search for the number 2 and I get returns that include
>>> 2, 12, 20, 22. is there a way to fix this?
>>
>>
>> One possibility is to use the more strict "literal" search flag that
>> would require an exact match of the input. Like this:
>> <option value="[has[intelligence]search:intelligence:literal
>> {$:/temp/search}]">Intelligence</option>
>> <option value="[has[climate_terrain]search:climate_terrain:literal
>> {$:/temp/search}]">Climate/Terrain</option>
>> <option value="[has[hd]search:hd:literal{$:/temp/search}]">HD</option>
>>
>> Then, when entering the search input, he could type in the number,
>> surrounded by whitespace (e.g., " 2 ", without the quotes)
>>
>> That *should* force the search to match only the number 2 as a separate
>> "word" in the text, preventing it from matching "12", "20", or "22".
>>
>> Of course, if the number is at the start or end of the text to match, he
>> would need to type "2 " or " 2", respectively.
>>
>> It's not a perfect solution, but it might allow him to work around some
>> of the specific use-cases he needs.
>>
>> -e
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
--
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/8ff36268-f9c2-4233-8837-015e89b75451%40googlegroups.com.