thanks , do u mean changing it to this? My doctype name is nestle and field name is calc1 so using your suggestion, would it look like down below. thanks so much for your help
frappe.ui.form.on(“Nestle”, “calc”, function(frm, cdt, cdn){
var doc = frm.doc;
});