View Single Post
Old 11-03-2011, 05:05 AM   #2
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,448
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Setting a composite column to hierarchical requires that the lookup name be typed by hand into the box in preferences -> tags browser. Composite columns are not included in the drop-down list. I will look at fixing this.

The composite column type must be "column built from other columns, behaves like tags".

I tested whether composite columns can display as hierarchical, and it works.

The following function returns one of two values, based on whether the database ID is odd.
Code:
def evaluate(self, formatter, kwargs, mi, locals):
	if (mi.id % 2) == 1:
		return 'foo.bar'
	return 'foo.mumble'
I created a composite tags-like columns named #comp2, and called the function in its template.
Code:
program: myFunction()
The attached screen shot shows that the column is being displayed as hierarchical.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	314
Size:	9.3 KB
ID:	78566  
chaley is offline   Reply With Quote