Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2633 Vistas

Hello,
I am taking my first steps with the OWL framework.


Now i have a question. I want to read out the records of a model and then for example count them with javascript.

In this example i want to count the number of records for a special type:

this.model = "videc\.partner\.note"
this\.taskList\ =\ await\ this.orm.searchRead(this.model, [],["type"])

How can i do this now with this.tasklist?
Thanks for your help.

Avatar
Descartar
Autor Mejor respuesta

Found a solution

const notes= (await this.orm.searchRead(this.model, [],[]))        
for(var i in notes) {           
​console.log(notes[i])       
}


Avatar
Descartar