Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2691 Widoki

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.

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Found a solution

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


Awatar
Odrzuć