View Single Post
Old 06-13-2025, 09:23 AM   #16
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,475
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I have "omnibus" in the admintags column.
Then this should work, again assuming that the fractional part is always 2 digits.
Code:
program:
	if '^omnibus$' inlist_field '#admintags' then
		series_start = floor($series_index);
		fraction = fractional_part($series_index);
		if fraction ==# 0 then
			result = series_start
		else
			series_end = floor(fraction*100);
			if series_end >=# 0 then
				result = series_start & '-' & series_end
			fi
		fi
	else
		result = $series_index
	fi;
	result
chaley is offline   Reply With Quote