Hello hpinson, use the prefix attribute of dtml-in, e.g <dtml-in sqlQuery prefix=seq> <dtml-var "seq_number-1"> is equal <dtml-var seq_index> or <dtml-var sequence-index> </dtml-in> Hope it helps Ulrich -- World Wide Web Publisher, Ulrich Wisser, Vallatorpsv.158, S-18752 Täby http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06