View Single Post
Old 04-13-2020, 12:56 AM   #19
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
Quote:
Originally Posted by Skydog View Post
Thank you, davidfor. Even with your detailed explanation I failed. I copied/pasted your program, with changes, to the template field of the new composite column as shown below:

format_date(raw_field('#finished'),'MMM.yyyy')
You need "program:" in front of that. This tells calibre to use the "general program" mode for the template. It should be:

Code:
program:
format_date(raw_field('#finished'),'MMM.yyyy')
Though it can be on one line.

It could also be done as:

Code:
{#finished:format_date(yyyy.MM.dd)}
This is probably a faster when executing. I believe general program mode has some overhead when changing the template mode. I prefer the genera program mode as it tends to be easier to read for anything complicated. I frequently write in general program mode and then change it to one of the other modes when I have it worked out.
Quote:
Something is wrong since it created a new (Read) column and populated every line in my library with the the program as written above. Also, it wiped out all my existing "Finished" entries while recoloring all my books (instead of only those that have been finished, as I have customized). I deleted the attempted column and all has returned to normal.
That shouldn't happen. Adding a new column shouldn't change anything about the existing columns. The only thing I can think of is that you are using the View Manager plugin and this didn't handle adding the new column properly.
Quote:
The new "Read" column appeared in the tag browser but when clicked on, it displayed the program. BTW, what should be selected in the "Sort/Search column by" field? I had Date selected but it appears selecting other options had no effect.
That is because the template for the new column is wrong. When that is fixed, this will be as well.
davidfor is offline   Reply With Quote