how to use aggregate functions in a subform context

how to use aggregate functions in a subform context

I would like to use the "sum" function in a subform script as follows:

On User Input (for a subform field):

input.Total = rows.sum(Item_Amount);

This doesn't work at present. Any suggestions? Will this be implemented in future?

Anton