View Single Post
Old 03-27-2025, 02:50 PM   #4
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,394
Karma: 80947541
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by maddz View Post
I'd be interested in this functionality. I've got a reading position column (null - 100) which is updated from my Kobo and a Read column (Y/N checkmarks). I have never been able to get the Read column to automatically switch to Y if the reading position is 100; I have to do this manually; which is a pain if I've been reading a lot of short stories.
Boolean column - replace with composite:

Click image for larger version

Name:	2025-03-27 14_50_05-Create a custom column.png
Views:	54
Size:	22.2 KB
ID:	214681

Code:
program:

## Replace with your percent-read column
percent = raw_field('#percentread', -1);

	switch_if(
		percent ==#100, 'yes',
		percent==#-1, '',
		'no'
		)
Remove line 8 if you want nulls to display 'no' instead of empty. Show Checkmarks turns into checkmarks.

Last edited by ownedbycats; 03-27-2025 at 02:58 PM.
ownedbycats is offline   Reply With Quote