View Single Post
Old 12-31-2023, 03:38 PM   #1213
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,170
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by shinykari View Post
Is there a way to update a column only if the current value is blank? I would like to set the "kobo_read_date" to the current date, but only if the "kobo_read_date" is currently empty.
You can use a single-field edit with this template:

Code:
program:

	if 
		$#kobo_read_date
	then 
		$$#kobo_read_date
	else 
		today() 
	fi
This checks whether #kobo_read_date is populated. If so, it'll return its value and remain unchanged. If it's not populated, it instead returns current datetime.
ownedbycats is offline   Reply With Quote