ArraySum in Lucee for Query Total and ValueList


Over at Lucess's Atlassian bug board is a reported which I come across all the time in cross compatibility between ACF and Lucee https://luceeserver.atlassian.net/browse/LDEV-544

I'm not a fan of proprietary functions like queryColumnData, so the easiest equivalent for both to work is :

arraysum(listtoarray(valuelist(qryObject.columnname)))

Not as neat as the old ArraySum(qryObject["columnname"]), but who cares, I only seem to use it for table totals anyway!

Comments

Popular posts from this blog

cf_sql_timestamp vs cf_sql_date vs getdate()

Global SQL Procedure, System Objects and sp_ms_marksystemobject

Ghost Records, Card Recon and PCI Compliance