Add a child table field value when another field in the same child table is filled

I have a child table in sales invoice, it has two fields Taxes, tax percentage

now the value of tax percentage is dependent upon value of Taxes field
for example value of Taxes will be ‘GST 18% - P’ so value of field ‘tax percentage’ should be 18
so how can i fill the value of field ‘tax percentage’ when the field Taxes is filled

Hi @Vinay1,

You can apply the client script for that. Please check it.

frappe.ui.form.on('Sales Invoice Item', {
    item_tax_template: function(frm, cdt, cdn) {
        var row = locals[cdt][cdn];
        var taxTemplate = row.item_tax_template;

        var taxPercentage = taxTemplate.match(/\d+/);
        if (taxPercentage) {
            frm.set_value('tax_percentage', parseInt(taxPercentage[0]));
        } else {
            frm.set_value('tax_percentage', null);

Please set your field name in the script according.

Thank You!