Custom script on field depends on other field on doc forms
By Aylmer Ametewee on December 12, 2024
BeginnerFind below a sample custom script when a field depends on another field on doc form .
In below script field Machine on Doc form Machine depends on field Floor on doc form Floor
frappe.ui.form.on('Material Request', {
floor: function(frm){
var floor = frm.doc.floor;
frm.set_query("machine", function(){
return {
filters: [
["Machine","floor","=",floor]
]
}
})
}
})
Was this article helpful?
More articles on Miscellaneous