06-15-2012, 07:07 PM | #1 |
Member
Posts: 19
Karma: 10
Join Date: Jun 2012
Device: Nook
|
[Custom Column - Composite] Template Help Requested
I am hoping that someone can help me figure this out. Based upon the information that I am reading in the manual and documentation it should be doable, but I may be missing something.
I have three Custom Columns that are the following:
What I am trying to do is have the chapters_remaining column calculate the difference between chapters and last_chapter_read. There is a math function called subtract (x, y) that by all appearances should do the job that I want to do. Unfortunately all attempts I have made at getting this to work have failed with differing errors depending upon what I have entered for the template. Can someone help me figure this out? |
06-16-2012, 04:51 AM | #2 |
Grand Sorcerer
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Try something like
Code:
program: format_number(subtract(field('#chapters'), field('#last_chapter')), '{0:.0f}') Last edited by chaley; 06-16-2012 at 05:00 AM. Reason: Fix syntax error introduced by copy/paste |
Advert | |
|
06-16-2012, 04:58 AM | #3 |
Member
Posts: 19
Karma: 10
Join Date: Jun 2012
Device: Nook
|
It had an extra ') at the end but once I removed that it worked perfectly. THANK YOU!
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugboard, template, and custom composite column recipes | chaley | Library Management | 971 | 12-04-2023 04:57 PM |
Sorting/searching composite column causes slow startup [solved] | capnm | Library Management | 0 | 11-08-2011 11:44 AM |
Composite column or not ? | Bertrand | Library Management | 3 | 08-24-2011 01:27 AM |
Help with template for custom column from tags | africalass | Library Management | 2 | 07-16-2011 11:47 AM |
Custom Composite Column | silentguy | Calibre | 4 | 11-24-2010 10:28 AM |