Guys I am trying to make this field like the last image attached in the customer doctype.
What I want is the user should be able to select multiple fields, and based on the field selected they should be given option to choose any child industry (if parent industry has them).
I found out by reading here that there is no multiple select field option, nor are there multiple check box options. So I decided to do it the child doctype way where the child is shown as grid so user can add multiple rows. However, I am unable to configure the child industry match so that only the child of that specific parent is shown and not all the child industries.
This code worked fine on the Item Client Script, I edited this to the best of my knowledge but it wasn’t filtering on my customer script.
cur_frm.set_query("brand", function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: [
["manufacturer", "=", d.manufacturer]
]
}
A simple google search: Can guys be used for girls?
Top Result:
Yes, it is often used in both male and female groups in casual speech. An interesting tidbit about the term “guys” is that it is probably much more often used than either “boys” or “girls” in common speech. Often it is gender-specific, but not always.
Nomenclature in general is often misleading
Anyways,
I tried,
cur_frm.set_query("child_industry", function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
return {
filters: [
["parent_industry", "=", d.parent_industry]
]
}
});