View Single Post
Old 03-27-2021, 09:47 PM   #1
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,050
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Template: Syntax error (again!)

I made this template for Action Chains' single-field edit to set #fanficstatus to "Abandoned" if it's more than two years old:

Code:
program:
d1 = raw_field('#fanficupdated')
d2 = format_date(today())

if
	and(
		field('#fanficstatus')=='In-Progress'),
		days_between(d1, d2)># 730,
		)
then
	"Abandoned"
else
	field('#fanficstatus')
fi
it returns EXCEPTION: Formatter: Syntax error - program ends before EOF near ')'.

I got a different error if I remove the first two lines after program: so I may have syntaxed the format_date wrong (I was trying to figure it out from the documentaiton and some other templates I had saved and the ones generated from column icon rules).

What did I do wrong this time?


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