Helli,
first of all, thank for this amazing piece of software.
I would like to ask how to "programmatically" add items (rows) to a table (sorry if I'm not using the correct jam-py terminology here):
This is how far I can get:
btn_sched.click(function (){
if (item.scheda_di_controllo.value !== null) {
let schede = task.prove_scheda_controllo.copy();
schede.open({where: {master_rec_id: item.scheda_di_controllo.value} }, function(){
schede.each(function(rec) {
item.details.Risultati.open();
item.details.Risultati.append();
item.details.Risultati.prova.value = rec.prova.value;
item.details.Risultati.cicli.value = rec.cicli.value;
item.details.Risultati.limite_matrice.value = rec.risultato_matrice.value;
item.details.Risultati.limite_pelle.value = rec.risultato_pelle.value;
});
});
}
});
So I want to add some records from "scheda_di_controllo" to the details of the open table.
The code I posted "sort of" works: only the first row is added, on the following rows I get this exemption:
Uncaught Item Risultati - can't append record: master item is not in edit or insert state
Here I'm stuck...
If context of the problem is not enough clear I will post more details.
Thanks
Simone