Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2016, 05:15 AM   #1
barlowrm
Member
barlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beauty
 
Posts: 20
Karma: 32380
Join Date: Nov 2016
Device: kindle
Yes/No column built from other columns

Dear all,

I am experimenting with columns built from other columns.

I can easily create a text column, but I was wondering if one could also use templates to control a Yes/No column.

I can of course build a text column whose contents are "Yes" and "No", but I find the icon display in the Yes/No column more effective than text.

Thanks for your help,

Andrea.
barlowrm is offline   Reply With Quote
Old 11-17-2016, 05:52 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,687
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@barlowrm - Have a look at Preferences->Look and Feel->Column icon (rightmost tab).

I would use Icon with no text, on an integer column, and then make use of the template logic that yields 'Yes' or 'No', in an Advanced Rule template that yields 'green tick.png' or 'red cross.png'. The value of the integer column is irrelevant, it's just a hook on which to hang an icon (or more if you use "Composed (i.e. multiple) icons with no text)

Then I would remove the composite column.

You must supply the icon images (a 128px square PNG is recommended, with transparent edges is best), I keep mine in a myIcons folder in the calibre config directory. I can usually find something suitable here ==>> Browse Icon Packs - FindIcons.com

Waiting for Midnight to arrive at Greenwich Observatory is a bit like Waiting for Godot

BR
BetterRed is offline   Reply With Quote
Advert
Old 11-17-2016, 06:20 AM   #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,398
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by barlowrm View Post
Dear all,

I am experimenting with columns built from other columns.

I can easily create a text column, but I was wondering if one could also use templates to control a Yes/No column.

I can of course build a text column whose contents are "Yes" and "No", but I find the icon display in the Yes/No column more effective than text.

Thanks for your help,

Andrea.
Just check the "Show Checkmarks" box in the column definition. This box is available if the column is not "behaves like tags". If the result of the template is recognizable as boolean (Yes, No, true, false, etc) then an icon is displayed instead of the text.
chaley is offline   Reply With Quote
Old 11-17-2016, 06:21 AM   #4
barlowrm
Member
barlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beauty
 
Posts: 20
Karma: 32380
Join Date: Nov 2016
Device: kindle
Hi @BetterRed,

and thanks *again* for your reply. This works greatly, except I don't seem to be able to sort on an icon column. It works if in addition to the icon I attach some text to the column using a template. Then the icons are just ignored in the sorting.

I must admit I am not even sure what the "correct" behavior here would be. I guess sorting on icon filename would already be better than no sorting at all (at least it would group entries with identical icons). Do you know if there is a way to obtain this?

Thanks for your help,

Andrea.
barlowrm is offline   Reply With Quote
Old 11-17-2016, 06:32 AM   #5
barlowrm
Member
barlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beautybarlowrm does all things with Zen-like beauty
 
Posts: 20
Karma: 32380
Join Date: Nov 2016
Device: kindle
Quote:
Originally Posted by chaley View Post
Just check the "Show Checkmarks" box in the column definition. This box is available if the column is not "behaves like tags". If the result of the template is recognizable as boolean (Yes, No, true, false, etc) then an icon is displayed instead of the text.
Hi Chaley,

thanks for your reply. This gives me indeed both the Yes/No icons and the columns sort.

Cheers,

Andrea.
barlowrm is offline   Reply With Quote
Advert
Old 11-17-2016, 02:34 PM   #6
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,687
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
Just check the "Show Checkmarks" box in the column definition. This box is available if the column is not "behaves like tags". If the result of the template is recognizable as boolean (Yes, No, true, false, etc) then an icon is displayed instead of the text.
@chaley - I never knew that, I've always read it as being 'show checkboxes in the Tag Browser' (for multiple column searching) When I couldn't see them I shrugged and moved on; I don't use the Tag Browser much.

@barlowrm - sorry for the garden path, the lesson is: if you want to know what a field does look at the tool tip (I know that now, but I didn't when I started):-
Quote:
Show checkmarks
Show check marks in the GUI. Values of 'yes', 'checked', and 'true' will show a green check. Values of 'no', 'unchecked', and 'false' will show a red X. Everything else will show nothing.
Can't get clearer than that.

BR

Last edited by BetterRed; 11-17-2016 at 03:11 PM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A custom column built from other columns: simple math operations Joanna Calibre 26 06-07-2016 04:35 AM
Request: template-making assistance for column built from other columns iienderii Library Management 9 04-04-2016 10:27 PM
How to "copy" or combine tags in two columns not as a built column? jecilop Library Management 7 09-04-2014 07:26 PM
Date custom column built from a Y/N one? glos Library Management 3 08-25-2013 12:48 PM
Custom yes/no column built from long text column Philantrop Library Management 7 03-23-2013 07:44 PM


All times are GMT -4. The time now is 10:21 AM.


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