Display division depend ondepartment selection

i have 5 department and in each department there are 6 division.

  1. Department selection
  2. Division selection.

i need when i select HR department , it should display only Division which are under HR department in Division selection.

just now i m getting all the division

thanks in advance

You can use custom script for link filter validation.

frappe.ui.form.on("Annual Appraisal Report For Head Office", "onload", function(frm) {
 cur_frm.set_query("key_result_area","kra_assessment",function() {
        return {
            "filters": {
                "designation":  cur_frm.doc.designation

can i use depends On field to filters the division according to department ?

Hello @kinzang,

Please refer the below example.

eval: doc.packing_option == “Box Cost”


i think this is not efficient solution.

Thanks @bhavikpatel7023.