View Single Post
Old 07-03-2021, 01:29 PM   #126
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,085
Karma: 76037135
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question. I have this composite column, with sort/search by text:

Code:
program:

input = $#kobobookmark;
a = re(input, '.*\/file(\d+).*', '\1');
fan = $#fanficcat;
status = $#fanficstatus;
ccount = $$#chaptercount;

	if 
			fan
		&&
			status !='Anthology'
		&& 
			$#currentlyreading 
		&& 
			substr(input, 0, 10) == 'OEBPS/file'
	then		
		strcat(format_number(subtract(a, 1), '{0:,d}'), '/',ccount)

	elif
		status ='Oneshot'
	then
		ccount

	elif
		ccount >#1
	then
  		ccount

	fi
On a non-fanfiction book with an undefined ccount this displays as "None." If I switch to non-raw field it becomes blank instead.

Click image for larger version

Name:	2021-07-03 14_27_56-.png
Views:	1470
Size:	534.8 KB
ID:	188025

I don't mind it here, but why does raw field result in "none" instead of blank?

Actually I just realized I could probably remove the second elif statement and combine it with the third with a != compare op...

Last edited by ownedbycats; 07-03-2021 at 01:39 PM.
ownedbycats is offline   Reply With Quote