How to apply set_query filter on Table Multiselect field?

Hi Community,

Can someone please tell me how to use set_query on Table Multiselect field? Basically i want to show only submitted documents, currently the field shows all the records including docstatus 0 & 2

ERPNext Version: v13.18.0

Thankyou

@Shiv_Shan
custom_alternative_workstations = fieldname of table multiselect type field
This field is link with child table “Alternative Workstations”
this child table has one link field Workstation (Link with Workstation)

workstation_name field is available in Workstation doctype

cur_frm.fields_dict.custom_alternative_workstations.get_query = function (doc) {
return {
filters: {
workstation_name: [‘!=’, frm.doc.workstation],
},
}
}

2 Likes