Good afternoon first of all, I’m trying to use the function to sum the values of a column of the content manager, but when executing the code I get this error
export function Sum_Buenas ( ){
var idproy = $w ( ‘#text9’ ). text ;
const filter = wixData . filter (). eq ( “IDProyecto” , idproy );
wixData . aggregate ( “MYSQL/RepSerial_tbl” )
. filter ( filter )
. group ( “IDProyecto” )
. sum ( “BUENAS” , “totalBuenas” )
. run ()
. then ( ( result ) => {
var totalB = result . items [ 0 ]. totalBuenas
$w ( ‘#text37’ ). text = totalB . toString ()
})
. catch ( ( error ) => {
let errorMsg = error . message ;
let code = error . code ;
})}
this is the error
