| 
			
			 | 
		#886 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I have a date column, #fanficupdated. Is it possible for a template rule to compare that to the date of a matched book currently on the device and return a bool?  
		
	
		
		
		
		
		
		
		
		
		
		
		
			I'd like to display a column icon if the version of a fanfic in my library is newer than the one on the device (to remind me to re-upload it). Making a hidden composite column to tie the icon to seems best idea. Last edited by ownedbycats; 09-23-2020 at 09:05 PM.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#887 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			For a format_date, how would I make it return the first three numbers of the year?  
		
	
		
		
		
		
		
		
		
		
		
		
	
	![]() Code: 
	{pubdate:'test($,
strcat(format_date($,'yyyy')),
'Unknown')'}
 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#888 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 It seems that adding substr to the template functions might be a good idea.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#889 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Is there a template function that can test for "does this book have an annotation/bookmark"?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#890 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#891 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thank you.  
		
	
		
		
		
		
		
		
		
		
		
		
		
			  For context, I was hoping to make a psuedobool composite column.
		Last edited by ownedbycats; 10-30-2020 at 05:19 AM.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#892 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#893 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Understandable. I might make an enhancement request for some option to mark all the books with annotations.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#894 | ||
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Quote: 
	
 I also added a template function annotation_count() that returns the count if it is > 0 else the empty string. This will work with template functions like "isempty()", "test()", "first_non_empty", etc. It will also work with numeric relationals such as "if annotation_count() ># 0 then 'foo' else 'bar' fi"  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#895 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Thank you  
		
	
		
		
		
		
		
		
		
		
		
		
	
	 
		 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#896 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 Code: 
	program: p = identifier_in_field(id:isbn) g = identifier_in_field(id:goodreads) if p then strcat(p) else if g then strcat(g) fi I'm still trying to figure these out.  
		 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#897 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,686 
				Karma: 12595249 
				Join Date: Jun 2009 
				Location: Madrid, Spain 
				
				
				Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	program:
	p = identifier_in_field(id:isbn)
	g = identifier_in_field(id:goodreads)
        if p then strcat(p)
        else 
           if g then strcat(g)
           fi
        fi
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#898 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 
 Code: 
	program:
	i = field('identifiers');
	ifempty(select(i, 'isbn'), select(i, 'goodreads'))
Code: 
	program:
	i = field('identifiers');
	p = select(i, 'isbn');
	if p then p else select(i, 'goodreads') fi
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#899 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,360 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			That works.  
		
	
		
		
		
		
		
		
		
		
		
		
	
	  I was just starting out with the two identifiers as a a test case. Eventually I want to encompass more identifiers in descending priority (e.g. if isbn or goodreads doesn't exist, check asin, then google, then url, etc...).
		 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#900 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	program:
	i = field('identifiers');
	first_non_empty(
		select(i, 'isbn'),
		select(i, 'goodreads')
# more as desired
	)
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Tags | 
| custom column, tag, tags | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Should composite columns appear in Grouped Searches? | ownedbycats | Library Management | 3 | 02-13-2021 04:43 PM | 
| Having problems with composite columns and save/send templates | Trel | Calibre | 4 | 09-26-2016 04:21 PM | 
| Tooltips for narrow columns | theducks | Library Management | 7 | 03-16-2015 11:58 PM | 
| Techniques to use plugboards, custom columns and templates | kovidgoyal | Library Management | 0 | 01-26-2011 05:21 PM |