Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 10-01-2018, 03:23 PM   #1
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Question column from other columns with hierarchy and names

I created several custom columns that i use for my comics collection.
Like #letterers, #illustrators, #colorists.
Now I am trying to create column #artists that will contain all those
columns sorted hierarchically by occupation.
Closest I got was with the template:
illustrators.{#illustrators}, colorists.{#colorists}, letterers.{#letterers}
this way it creates hierarchy, but I end up with two problems.

All entries that does not have entry in these columns are still in artists column under illustrators. or colorists. or letterers. How to not include such entries?

Second problem is if my custom columns have more that one name. The #artists column counts all the names as one entry.

Tried several versions of in_list() but can't figure the right formula.

Would appreciate any help I can get.
DBorG is offline   Reply With Quote
Old 10-01-2018, 04:03 PM   #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: 11,916
Karma: 7176769
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Given that I don't have the columns you describe, the best I can do is a guess at something that might solve your problem.
Code:
program:
	a = list_re(field('#letterers'), '&', '(.*)', 'letterers.\1');
	b = list_re(field('#illustrators'), '&', '(.*)', 'illustrators.\1');
	c = list_re(field('#colorists'), '&', '(.*)', 'colorists.\1');
	t = list_union(a, b, '&')
	list_union(c, t)
There is probably a better way to merge the results of the 3 list_re functions given that they are orthogonal , but I leave that to you. Good luck!
chaley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Column Built from other Columns question abqkjh Library Management 2 09-15-2017 11:08 AM
Several columns sharing same set of author names? 284984 Library Management 3 06-30-2017 06:45 PM
Yes/No column built from other columns barlowrm Calibre 5 11-17-2016 02:34 PM
Hierarchy columns mezme Calibre 7 03-07-2016 01:10 PM
file names column Vince197 Library Management 9 05-07-2011 03:25 AM


All times are GMT -4. The time now is 12:57 PM.


MobileRead.com is a privately owned, operated and funded community.