An idiosyncrasy of aggregate functions is that they must be used inside “Text” objects; once used in this manner they can then be used in the script itself. If an aggregate function only appears in a script (without appearing in a “Text” object) an error message is generated. This happens because an aggregate function must be connected to a specific band; once so connected it will work correctly.