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 09-13-2014, 08:32 AM   #91
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
Do you know if I can make a custom column based on a user category?
Quote:
Originally Posted by BetterRed View Post
That harks back to this problem
The template language cannot see user categories, so it isn't possible to use them in a custom column.
chaley is offline   Reply With Quote
Old 09-13-2014, 08:39 AM   #92
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Quote:
Originally Posted by chaley View Post
I read the request as "add an icon if (some column) has more than 3 values.

You do this with a custom rule, something like:
Code:
program:
	cmp(count(field('tags'), ','), 3, '', '', 'someicon.jpg')
where you replace 'tags' with the lookup name of the fandom column and 'someicon.jpg' with the name of the icon file you want.
You were correct. Maybe I didn't explain well enough.

Where do I write that piece of code? In Advanced Rule under icons or?
Tanjamuse is offline   Reply With Quote
Advert
Old 09-13-2014, 08:43 AM   #93
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
Where do I write that piece of code? In Advanced Rule under icons or?
Yes, as an advanced rule in the column icons preferences.

Note that if you can display multiple icons by returning a comma-separated list of file names as in 'foo.jpg, bar.png, mumble.jpg'
chaley is offline   Reply With Quote
Old 09-13-2014, 08:56 AM   #94
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Have I done it correct?

Because it doesn't seem to be working.
Attached Thumbnails
Click image for larger version

Name:	Skærmbillede 2014-09-13 14.54.47.png
Views:	208
Size:	36.7 KB
ID:	128283  
Tanjamuse is offline   Reply With Quote
Old 09-13-2014, 08:58 AM   #95
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
Have I done it correct?

Because it doesn't seem to be working.
No. You left off the word "program:".
chaley is offline   Reply With Quote
Advert
Old 09-13-2014, 09:31 AM   #96
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
It still doesn't seem to be working.
Attached Thumbnails
Click image for larger version

Name:	Skærmbillede 2014-09-13 15.30.33.png
Views:	170
Size:	36.8 KB
ID:	128294  
Tanjamuse is offline   Reply With Quote
Old 09-13-2014, 09:41 AM   #97
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
It still doesn't seem to be working.
Works fine for me.

First point: I am sure that "FanDom" is not the lookup key for the column. Lookup keys start with the # character.

Second: are you sure about that image file name? Use the "Copy an icon file name to the clipboard" box to check the file name and, if needed, correct it.
chaley is offline   Reply With Quote
Old 09-13-2014, 09:43 AM   #98
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: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Tanja - I think you need to change that Fandom to its internal name - eg #fandom

BR
BetterRed is offline   Reply With Quote
Old 09-13-2014, 09:48 AM   #99
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thank you both so much

What if there are only 2 different fandoms?

Edit:

Never mind, I actually figured it out myself

Thanks yet again

Last edited by Tanjamuse; 09-13-2014 at 12:34 PM.
Tanjamuse is offline   Reply With Quote
Old 09-15-2014, 04:26 AM   #100
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
I have a new question:

Can anyone help me with what's wrong with this, since the star doesn't show up in the column.

Quote:
program:
test(
or(contains(field('#ships'), "Lilly Rush/Scotty Valens", '', 'y')),
or(contains(field('#ships'), "Fran Fine/Maxwell Sheffield", '', 'y')),
'star.png',
)
I've also added the specifications for that custom column.

Thanks so much
Attached Thumbnails
Click image for larger version

Name:	Skærmbillede 2014-09-15 10.25.03.png
Views:	160
Size:	37.9 KB
ID:	128360   Click image for larger version

Name:	Skærmbillede 2014-09-15 10.14.39.png
Views:	189
Size:	29.8 KB
ID:	128361  
Tanjamuse is offline   Reply With Quote
Old 09-15-2014, 04:41 AM   #101
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Tanjamuse View Post
I have a new question:

Can anyone help me with what's wrong with this, since the star doesn't show up in the column.



I've also added the specifications for that custom column.

Thanks so much
First, the definition you show isn't for #ships. I assume that #ships is a text column.

I also assume that you want a star if #ships contains either "Lilly Rush/Scotty Valens" or "Fran Fine/Maxwell Sheffield". The following template does that.

Code:
program:
	test(
		or(
			contains(field('#mytextmult'), "Lilly Rush/Scotty Valens", 'y', ''),
			contains(field('#mytextmult'), "Fran Fine/Maxwell Sheffield", 'y', '')
		),
		'star.png',
		''
)
chaley is offline   Reply With Quote
Old 09-15-2014, 04:46 AM   #102
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
If I want more couples do I just copy the following:

Quote:
contains(field('#mytextmult'), "Lilly Rush/Scotty Valens", 'y', ''),
And insert another couple?
Tanjamuse is offline   Reply With Quote
Old 09-15-2014, 04:55 AM   #103
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: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Tanjamuse View Post
If I want more couples do I just copy the following:

Code:
contains(field('#mytextmult'), "Lilly Rush/Scotty Valens", 'y', ''),
And insert another couple?
Yes but you'll want this

Code:
contains(field('#ships'), "Lady Gaga/Tony Bennett", 'y', ''),
BR

Just bought it

Last edited by BetterRed; 09-15-2014 at 04:57 AM.
BetterRed is offline   Reply With Quote
Old 09-15-2014, 05:01 AM   #104
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thanks both of you, yet again
Tanjamuse is offline   Reply With Quote
Old 09-15-2014, 05:12 AM   #105
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Another question:

I don't know if I've done it correctly:
Attached Thumbnails
Click image for larger version

Name:	Skærmbillede 2014-09-15 11.10.55.png
Views:	170
Size:	40.5 KB
ID:	128362  
Tanjamuse is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column returns value based on value of another custom column? calvin-c Calibre 3 09-14-2013 02:24 PM
Custom yes/no column built from long text column Philantrop Library Management 7 03-23-2013 07:44 PM
how to move value(s) of tag column to a custom made column zoorakhan Library Management 0 12-08-2012 03:53 AM
custom date column from two state column Dopedangel Library Management 7 01-03-2012 08:20 AM
Can custom book data be displayed in a custom column? kiwidude Development 9 03-02-2011 05:35 AM


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


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