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 08-17-2018, 11:01 AM   #1
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
Combining two custom columns?

Hi,

I have a question but I apologize if this is not the proper place to ask. If so, plse kindly let me know where I should ask my question. Many thanks in advance.

Is it possible to create a custom column where you can enter new text that complements an existing set of defined values?

For instance, if I have a column with values A, B, and C, I may want to enter a value D which will be added to the existing list. Is it possible in calibre? I cannot see any such option.

Many thanks in advance for any help.

Patrik
pg111 is offline   Reply With Quote
Old 08-17-2018, 12:01 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: 12,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Moderator Notice
Made into its own thread
chaley is offline   Reply With Quote
Old 08-17-2018, 12:08 PM   #3
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by pg111 View Post
Hi,

I have a question but I apologize if this is not the proper place to ask. If so, plse kindly let me know where I should ask my question. Many thanks in advance.

Is it possible to create a custom column where you can enter new text that complements an existing set of defined values?

For instance, if I have a column with values A, B, and C, I may want to enter a value D which will be added to the existing list. Is it possible in calibre? I cannot see any such option.

Many thanks in advance for any help.

Patrik
The only way I can think of to do this is to create two columns, one for the values to add and one to display the merged columns. The first would be text, tags like. The second would be column built from other columns, behaves like tags. The second's template would be something like this:
Code:
program:list_union(field('tags'), field('#mytextmult'), ',')
Replace the column lookup names with the ones from your library.

If you want the list sorted then use list_sort:
Code:
program:list_sort(list_union(field('tags'), field('#mytextmult'), ','), '0', ',')
chaley is offline   Reply With Quote
Old 08-17-2018, 12:15 PM   #4
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
Do you use calibre to manage your printed books library?

Quote:
Originally Posted by chaley View Post
The only way I can think of to do this is to create two columns, one for the values to add and one to display the merged columns. The first would be text, tags like. The second would be column built from other columns, behaves like tags. The second's template would be something like this:
Code:
program:list_union(field('tags'), field('#mytextmult'), ',')
Replace the column lookup names with the ones from your library.

If you want the list sorted then use list_sort:
Code:
program:list_sort(list_union(field('tags'), field('#mytextmult'), ','), '0', ',')
Thanks, Charles.

And how or where do I use the
Code:
program:list_sort(list_union(field('tags'), field('#mytextmult'), ','), '0', ',')
line?

Sorry, I'm a beginner in customizing calibre.

Many thanks in advance for your answer.
pg111 is offline   Reply With Quote
Old 08-17-2018, 12:18 PM   #5
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by pg111 View Post
Thanks, Charles.

And how or where do I use the
Code:
program:list_sort(list_union(field('tags'), field('#mytextmult'), ','), '0', ',')
line?

Sorry, I'm a beginner in customizing calibre.

Many thanks in advance for your answer.
When you create a custom column built from other columns, one of the things you must provide is the "template". In this instance the template is a kind of program telling calibre what to do with metadata. There is a lot more in the manual The calibre template language.
chaley is offline   Reply With Quote
Old 08-17-2018, 12:21 PM   #6
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,680
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
If you don't mind, let's go a step back: You have column A which admits three values. Is that a predefined column or an existing column?

If it is a predefined one, you would have to go with chaley solution:
1.- Create custom column B, which will have only the new values
2.- Create custom column C (composite created based on other columns), and the function will be the function chaley has written before.

So, now you will have to introduce values in A or B depending of the value and C will show always the proper value.

If A is a custom column, the easiest way to do it is to modify column A to add new values.

I guess it will be predefined, but only to be sure.
Terisa de morgan is online now   Reply With Quote
Old 08-17-2018, 12:29 PM   #7
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Terisa de morgan View Post
If you don't mind, let's go a step back: You have column A which admits three values. Is that a predefined column or an existing column?
Always a good idea to ask what the end goal is.
chaley is offline   Reply With Quote
Old 08-17-2018, 12:31 PM   #8
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
How to get a custom value managed like Authors field?

Hi,

I have another pending question.

I have created a custom Foreword column in which it is possible to specify who wrote a foreword to the currently selected book.

When I right-click on the value in it and select Manage Foreword, I would like to get the same dialog box as when I right-click Author's name and select Manage Author. In other words I would like to handle Foreword as if it were an Author's name.

How can I get this result?

Many thanks in advance.
pg111 is offline   Reply With Quote
Old 08-17-2018, 12:37 PM   #9
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by pg111 View Post
Hi,

I have another pending question.

I have created a custom Foreword column in which it is possible to specify who wrote a foreword to the currently selected book.

When I right-click on the value in it and select Manage Foreword, I would like to get the same dialog box as when I right-click Author's name and select Manage Author. In other words I would like to handle Foreword as if it were an Author's name.

How can I get this result?

Many thanks in advance.
The general answer is "You can't". A custom "contains names" column doesn't have a "sort" field.

However, right-clicking on the "Forward" label in the tag browser will give you a "Manage" dialog that might solve the problem.
chaley is offline   Reply With Quote
Old 08-17-2018, 12:43 PM   #10
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
Combining two custom columns?

Quote:
Originally Posted by Terisa de morgan View Post
If you don't mind, let's go a step back: You have column A which admits three values. Is that a predefined column or an existing column?

If it is a predefined one, you would have to go with chaley solution:
1.- Create custom column B, which will have only the new values
2.- Create custom column C (composite created based on other columns), and the function will be the function chaley has written before.

So, now you will have to introduce values in A or B depending of the value and C will show always the proper value.

If A is a custom column, the easiest way to do it is to modify column A to add new values.

I guess it will be predefined, but only to be sure.
Thanks, Terisa de morgan. I'm speaking of a custom column. In the list of custom column formats available I cannot see any format that allows me to modify an existing list of existing values on the fly. I mean everytime I enter C (or D, or E, and so on) in the column cell, the new value is added to the existing list.

That is what I'm in search of.

Let us say I have a list of book types. Initially it is a set of predefined values but later on I realize I had not thought of one specific type and would like to add it to my existing list. How can I do to create a custom column that allows me to do so?

I hope I made it clearer.

Many thanks in advance for any help.
pg111 is offline   Reply With Quote
Old 08-17-2018, 12:45 PM   #11
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by pg111 View Post
Let us say I have a list of book types. Initially it is a set of predefined values but later on I realize I had not thought of one specific type and would like to add it to my existing list. How can I do to create a custom column that allows me to do so?
Is there some reason you don't want to add the new type as one of the possible pre-defined values? You do that by editing the column definition.
chaley is offline   Reply With Quote
Old 08-17-2018, 12:54 PM   #12
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,206
Karma: 60406678
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by pg111 View Post
Thanks, Terisa de morgan. I'm speaking of a custom column. In the list of custom column formats available I cannot see any format that allows me to modify an existing list of existing values on the fly. I mean everytime I enter C (or D, or E, and so on) in the column cell, the new value is added to the existing list.

That is what I'm in search of.

Let us say I have a list of book types. Initially it is a set of predefined values but later on I realize I had not thought of one specific type and would like to add it to my existing list. How can I do to create a custom column that allows me to do so?

I hope I made it clearer.

Many thanks in advance for any help.
In the place you CREATED the custom (predefined tags) column: Select that column from the list:click the EDIT button on the right.
Note that you can't change the TYPE once created, but just about anything else can be updated. BEWARE of changing the lookup name if you have used it in plugins or scripts, Calibre can't suss out all uses, so those can now fail.
theducks is offline   Reply With Quote
Old 08-17-2018, 12:56 PM   #13
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
Combining two custom columns?

Quote:
Originally Posted by chaley View Post
The general answer is "You can't". A custom "contains names" column doesn't have a "sort" field.

However, right-clicking on the "Forward" label in the tag browser will give you a "Manage" dialog that might solve the problem.
Precisely it does not.

Plse find hereattached two screenshots:

One is for Manage Authors dialog box.

The other is for Manage Foreword (Préface in French) dialog box.

How can I get the latter behave similar to the first one?

Many thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	Manage Author dialog box.png
Views:	123
Size:	10.5 KB
ID:	165696   Click image for larger version

Name:	Manage Foreword dialog box.png
Views:	132
Size:	8.7 KB
ID:	165697  
pg111 is offline   Reply With Quote
Old 08-17-2018, 12:58 PM   #14
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,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by pg111 View Post
Precisely it does not.

Plse find hereattached two screenshots:

One is for Manage Authors dialog box.

The other is for Manage Foreword (Préface in French) dialog box.

How can I get the latter behave similar to the first one?

Many thanks in advance.
You can't. The Authors column is special, having value, sort and link. The names-like column has only value.
chaley is offline   Reply With Quote
Old 08-17-2018, 01:06 PM   #15
pg111
Connoisseur
pg111 began at the beginning.
 
Posts: 60
Karma: 10
Join Date: Dec 2016
Device: Kindle
How to get a custom value managed like Authors field?

Quote:
Originally Posted by chaley View Post
You can't. The Authors column is special, having value, sort and link. The names-like column has only value.
Thanks for your answer. I see clearly now. That seems to be a serious limitation for me. Unless I find an alternate solution to this problem I may give up the whole idea of using calibre to manage both my book libraries and I may revert to my initial project about a calibre-BookCAT route (which would not prevent me to keep using calibre for my eBooks).

Thanks again.
pg111 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom columns ChipAHoy Library Management 1 02-23-2018 02:50 AM
Custom Columns docmartn Library Management 3 08-30-2016 02:18 PM
Composite column problem combining two tag type columns At_Libitum Recipes 1 08-29-2013 12:31 PM
Custom Columns - How are you using yours? nynaevelan Library Management 19 04-18-2011 12:42 AM
0.7.46 and custom columns meme Library Management 4 02-21-2011 04:21 AM


All times are GMT -4. The time now is 02:00 PM.


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