Assign query data to District with link field

I have a Child Table is Parent Information Details in Leads Doctype.
In child Table form, i have province_id and district_id are link field to Province and District Doctype.
I want to query district has province_id was choose in province_id field.
this is my code:

frappe.ui.form.on(“Parent Information Details”, “provinceid”, async function (frm, cdt, cdn) {
let row = locals[cdt][cdn];
let province = row.provinceid;
/*
//This is the code i can get district by province but i dont know how to set it to districtid in child table
const districtList = await frappe.db.get_list(‘District’, { filters: { ‘province_id’: province }, fields: [‘*’] });
console.log(districtList);

frappe.db.set_value(cdt, cdn, 'districtid', districtOptions); */

//This code is not working
frm.set_query('districtid', 'parent_information_details', function () {
	return {
		filters: {
			province_id: province
		},
		fields: ['*']
	};
});

});

Please check the documentation, if you haven’t checked.

Of course!. that code is working if it’s not child Table. If I use a filter in childTable as shown in the picture, the parent side still cannot apply that filter



If I try with a field that is not childTable, the results will be filtered

I haven’t try and the feature is new so it might be under maintenance or in the development mode and it’s available on the develop branch not in the stable branch.

Thanks for your reply, can you let me know when this feature will be available?

You can use this feature once it’s available in a stable version. I’ll test it on my end when I install/update the development branch of ERPNext.