You could put each range in it's own field as a comma separated value in its own tiddler and tagged as needed. Individual values would also be entered as ranges. For instance
title: range 1 range: 1100,1299 tags: CBD title: range 2 range: 2000,2000 tags: CBD Then this code could compile the ranges on the fly and test for whether a value was in a group of ranges <$vars pre="[range[" sfx="]] " mynum="1200"> <$list filter="[tag[CBD]get[range]addprefix<pre>addsuffix<sfx>]" variable="ranges"> <$list filter="[subfilter<ranges>suffix<mynum>prefix<mynum>]">IN RANGE</$list> </$list> </$vars> Maybe? -- Mark On Monday, February 18, 2019 at 7:59:18 PM UTC-8, TonyM wrote: > > Folks, > > I thought I would share a little challenge with you. This is a challenge I > will overcome, and I will share my ultimate solution, but I am happy if > someone wants to contribute, or enjoys an intellectual/coding challenge. > > I Have a range of locations, they are defined by post codes / Zip codes, > sometimes they are a range and sometimes individual numbers > > ☐ Sydney Metro: 1000 - 1335 , 2760 -2770 > ☐ Sydney CBD: 1100 - 1299, 2000, 2001, 2007, 2009 > > I am keen to keep it simple, and not need to generate all the numbers > within a range yet I need to be able to search for a specific number. > > For example If I was to search for 1100 it would clearly be in the above > range 1000 - 1335 yet 1100 is not in the posts codes, it exists between two > post codes. > > My Thought is to have a Filter that defines the post codes in range such > as; > "[range[1000,1099]] [range[2760,2770]]" > > and > > "[range[1100,1299]] 2000 2001 2007 2009" > > Not withstanding the inconsistencies in the above data (to be remedied) I > would like to be able to search for a number that may be specified > specifically or implied in a range, and identify the tiddler in which it is > listed. > > I have a few ideas, but wondering if anyone has a great idea? > > > - Generate a Data Tiddler with all postcodes from my ranges, key > number value region tiddler > - When searching re-generate all numbers and search there in > > > Regards > tony > > > > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/374de9c0-dbbe-4c63-a97d-234f15ea2c23%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

