View Single Post
Old 08-11-2014, 11:58 AM   #4
kaufman
Calibre Companion Fanatic
kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.kaufman ought to be getting tired of karma fortunes by now.
 
kaufman's Avatar
 
Posts: 873
Karma: 1088610
Join Date: Nov 2006
Device: Galaxy Note 4, Kindle Voyage
Thank you both for the suggestions.

Quote:
Originally Posted by chaley View Post
I assume that you are using the new custom column in a user-defined sort (Authors, #yourCol). You could do it all in the custom column, freeing a user-defined sort and also giving you the possibility to invert the sort.
I'm actually not using the user-defined sorts at all. Partially for the inversion but mostly because i just didn't need it. The custom column already contained all the information I needed.

I have used both your suggestions and updated my definition to:

Code:
program:

strcat(
    field('author_sort'),
    " - ",
	ifempty(
		strcat(
			series_sort(),
			finish_formatting(
				field('series_index'),
				"5.2f",
				" (",
				")"
			)
		),
		field('title')
	)
)
Which is simpler, as well as using the various sorted versions of the columns. I originally didn't include the author at the beginning because I currently only use this for a single author, but I added it in to make the solution more general.


Off topic, but I wonder why its a field for author_sort but a function for series_sort.

Thanks again to both of you for the improvements.
kaufman is offline   Reply With Quote