I do have two fields inside a child table cutting iss which is in a parent cutting issue , I want to multiply qtyno and wtpc fields and put that value in qtykg field , all these fields are in the same child table cutting iss , the child table field name is ci .
then write a trigger on qtyno or wtpc instead on qtykg.[quote=“Ninja, post:2, topic:16102”]
frappe.ui.form.on(“Cutting Iss”, “qtykg”, function(frm, cdt, cdn)
[/quote]
try
frappe.ui.form.on("Cutting Iss", "qtyno or wtpc", function(frm, cdt, cdn)
Thanks for the reply @rohit_w . I am getting this error in the console , tried debugging the code to my best possible extent but still unable to debug ,
Uncaught SyntaxError: missing ) after argument list
The below script works only if I multiply a field with a number ,
frappe.ui.form.on("Forgin Iss", "issqty1", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, "tot", d.issqty1 * 6);
});
but if I replace the numerical value with a field , it is not working
frappe.ui.form.on("Forgin Iss", "issqty1", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, "tot", d.issqty1 * d.wtkg);
});
both issqty1 and wtkg fields are float fields,