Computing return fields with scripting