View Single Post
Old 10-21-2010, 07:37 AM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
Whatever I created and lost yesterday was probably the answer to all

True, that's probably a bit too much for the average user! But there might be a simpler solution as well:

#series_index_string = {series_index:0>4s}

and then use that #series_index_string with the switch...

{#series_index_string:switch(00\d\d,0000-0099,01\d\d,0100-0199,)}

That way you don't need to manually change any columns... (I tested it, it works).
This is an excellent suggestion. You would need as many arms in the switch as the highest series number, at most 10.

As long as you are on a roll, how would you deal with the second level of indexing? Would you use something like
{#sis:switch(0.$,0000-0009,1.$,0010-0019,2.$,0020-0029,....}

Last edited by chaley; 10-21-2010 at 07:46 AM. Reason: change lookup to switch
chaley is offline   Reply With Quote