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 07-03-2019, 12:00 AM   #1
BookJunkieLI
Evangelist
BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.
 
BookJunkieLI's Avatar
 
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
Need help with composite column

I currently have two columns built from other columns called Collection1 and Collection2. I use them to create collections on my Kindle but I frequently end up with a lot of duplication.

Collection1 is built from my custom columns #unread and #readinglist. Together these form the list of what I want to read next in various genres.

Collection2 is built from the custom columns #fave, #fandom, and #fandom2. These are favorite stories that I want on my kindle because I'm likely to read them again.

#fandom and #fandom2 will always have data in them. #unread, #readinglist, and #fave do not always have data in them. And therein seems to be the issue.

What I want is a collection column where if {#unread:||.}{#readinglist} has data it populates the column (ie N.Read Next Gen), if those two columns are blank then it fills in {#fave:||.}{#fandom}.{#fandom2} (ie F.Fandom.Sub-Fandom)

I tried using the first_non_empty({#unread:||.}{#readinglist},{#fave :||.}{#fandom}.{#fandom2}) but that resulted in the column reading:
first_non_empty(N.Read Next Gen,Fandom.Sub-Fandom)
or
first_non_empty(,F.Fandom.Sub-Fandom2)

I tried putting program: in front of it but that just returned a Template Error. I also tried putting If and then OR but got the same result as first_non_empty. I'm not particularly good and programming so I'm not sure what other functions I should try or if I'm just messing up the syntax.

Any help would be greatly appreciated. Thanks.
BookJunkieLI is offline   Reply With Quote
Old 07-03-2019, 07:20 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I think the following will work:

Code:
program:
first_non_empty(template("[[#unread:||.]][[#readinglist:]]"),template("[[#fave:||.]][[#fandom]].[[#fandom2]]"))
I can't test it properly as I don't have the right columns.
davidfor is offline   Reply With Quote
Advert
Old 07-03-2019, 11:42 AM   #3
BookJunkieLI
Evangelist
BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.BookJunkieLI ought to be getting tired of karma fortunes by now.
 
BookJunkieLI's Avatar
 
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,


It worked perfectly. Thank you so much for your help.
BookJunkieLI is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Composite column template question Anna_R Library Management 4 06-03-2015 03:59 AM
Composite Column BetterRed Calibre 12 09-01-2013 04:58 AM
Set value of another column from composite? dirgeon Library Management 1 02-03-2013 11:40 AM
Composite column or not ? Bertrand Library Management 3 08-24-2011 01:27 AM
Custom Composite Column silentguy Calibre 4 11-24-2010 10:28 AM


All times are GMT -4. The time now is 01:45 AM.


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