How to filter values in Link field in Child Table when another field is selected in Parent doctype

Hello guys
i’m trying to filters child table column based on the selected option in parent table.
my child table: “Warehouse Category Table” with following fields; equipment, location
my parent table: “Warehouse Category” with following fields; subcategory.
I want to select the subcategory and filters equipment and location belong to subcategory in the child table.
below is my code
//filter dropdown in Link Field type in a Child

frappe.ui.form.on(‘Equipment Category’, {
setup: function(frm){
frm.set_query(“equipment”, “equipment_movement”, function(doc, cdt, cdn){
let d = locals[cdt][cdn];
return {
filters: [
[‘Equipment’, ‘equipment’, ‘in’, 'Vehicles, Scaffold, Other tools, Power tools, Form work, Storage Facilities '],
[‘Equipment’, ‘location’, ‘=’, d.location]

my screenshot

you can get its value using frm.doc.its_name

than you for response. please explain better to me where to put it

it could be added [‘Equipment’, ‘subcategory’, ‘=’, frm.doc.subcategory]
after [‘Equipment’, ‘location’, ‘=’, d.location]
It depends on what you really want.

I will and give you feedback