Im unable to set an object to a state inside a query

Im trying to prepare some data in a javascript query before calling a stored procedure in another query, but when i try to save the object to the state nothing happens

this is the code in my javascript query:

const arrayOfVencimientos = []
const valorCuota =[0].monto_prestamo /[0].cantidad_cuotas
const cantidadCuotas =[0].cantidad_cuotas
const comienzoPrestamo =[0].comienzo_prestamo

for (let i = 0; i < cantidadCuotas; i++) {
  const startDate = moment(comienzoPrestamo)
  const nextDate = moment(startDate).add(i + 1, 'M')

const objectToSave = {
  vencimientos: arrayOfVencimientos,
  valor: valorCuota,
  cuotas: cantidadCuotas


Hey @Trimux, Can you try console logging objectToSave directly above the line where you call datosCuotas.setValue(objectToSave)? Can you also share what datosCuotas is?