View Single Post
Old 09-26-2010, 12:29 PM   #98
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,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
I've got a problem with the custom fields:

I've got two books:

Book 1:
Author: Thea Beckman
Title: Kinderen van Moeder Aarde
Series: KvMA
Series Index: 1.0 ...

Book 2:
Author: Het Helse Paradijs
Title: 02
Series: [empty]
Series Index: [empty]
...
I created a new custom field:

{Author} - {Series} {Series_index:0>2s} - {Title}

Book 1 is filled with: Thea Beckman - KvMA 1.0 - Kinderen van Moeder Aarde
Book 2 is filled with: Het Helse Paradijs - 00 - 02
Looking more carefully at this, I contend that both are wrong. The first is wrong because it didn't use series formatting and displayed the float. I fixed this.

The second is wrong because *nothing* should be displayed when the book has no series. The '00' shouldn't be there. I will fix this as well.

Note: if you really want the 00, you use another field and the ifempty function. Create a composite field containing {series_index:0>2s}, lets call it AA. In the original you would use
{Author} - {Series} {AA:ifempty(00)} - {Title}
chaley is offline   Reply With Quote