View Single Post
Old 05-16-2017, 03:27 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: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by bttrflii View Post
I can't quite figure out what you're trying to say. I *DO* want the leading zero, and I currently get a leading zero when the series number is a whole number. What I'm asking is how to get a leading zero in front of partial numbers as well, without adding three extra characters (a decimal and two zeroes) to all of the whole numbers.
It is possible to do what you want, but it requires making a custom column "Made from other columns" to compute the value.

Make the column and use the following as the template:
Code:
program:
	si = field('series_index');
	format = contains(si, '\.', '{0:06.2f}',  '{0:03d}');
	format_number(si, format)
Assuming the lookup name for this new column is #myseries_index, then use {#myseries_index} in the plugboard where you currently use series_index.
chaley is offline   Reply With Quote