Set filter in childtable

I am using version 13 and trying to set a filter in the child table field job1, but it is not working as expected. The task_names list contains the value ['CA/JOBS-2024-0667']. Below is the code I am using:

frm.set_query('job1', 'time_logs', function(doc, cdt, cdn) {
    let child_row = locals[cdt][cdn]; 
    return {
        filters: {
            name: ['in', task_names] 
        }
    };
});

Can someone help me understand why the filter is not working or suggest a solution?

// set filters for Link field item_code in
// items field which is a Child Table
frm.set_query('item_code', 'items', () => {
    return {
        filters: {
            item_group: 'Products'
        }
    }
})

see this

1 Like