View Single Post
Old 12-04-2010, 04:05 AM   #10
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,467
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by mornington View Post
And I see it's appeared in release 0.7.32.

One small issue. though, is that the "number" produced by count() seems to be treated as text, rather than an integer, for sorting purposes meaning that "{authors:count(&)}" can't be sorted numerically.

This can be worked around by using a second custom column with "{#numauthors:0>2s}" but is there any way to have the whole thing done in a single field (i.e. so the output is "01","02,"03",etc) or to make the numbers in such a column be sorted as numbers, rather than as text?
I assume you have created a composite custom column showing this value? If you want leading zeros, then that column's template should be
Code:
{authors:0>2s:count(&)}
Format specifications are applied after function specifications.

As for specifying the sort type, that won't work in your case. Composite columns are always strings.
chaley is offline   Reply With Quote