|
|
#1 |
|
Enthusiast
![]() Posts: 37
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?
|
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
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 06:00 AM. Reason: Fix syntax error introduced by copy/paste |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 37
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!
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using templates for file names, plugboards, composite columns, searches, tooltips | chaley | Library Management | 1053 | 05-28-2025 09:34 AM |
| Sorting/searching composite column causes slow startup [solved] | capnm | Library Management | 0 | 11-08-2011 12:44 PM |
| Composite column or not ? | Bertrand | Library Management | 3 | 08-24-2011 02:27 AM |
| Help with template for custom column from tags | africalass | Library Management | 2 | 07-16-2011 12:47 PM |
| Custom Composite Column | silentguy | Calibre | 4 | 11-24-2010 11:28 AM |