Child Table dynamic select field

I us following syntax but it doesn’t worked
1.frappe.utils.filter_dict(frm.fields_dict[“readings”].grid.docfields, {“fieldname”: “parameter_value”})[0].options = r.message;
2.var df=frappe.meta.get_docfield(‘Quality Inspection Reading’,‘parameter_value’,frm.doc.name);
df.options=r.message;

2 Likes

I have the same problem

i try this but it doesn’t worked for me, after version-13 stable update it’s doesn’t working

frm.fields_dict.readings.grid.update_docfield_property(
‘parameter_value’,
‘options’,
[‘’].concat(r.message)
);

1 Like

frappe was changing upper function prototype, but it seems you provide reliable solution @ajay374-J thanks for it

editing for more clarity

image

frm.fields_dict.child_table_name.grid.update_docfield_property(
“field_name”,
“options”,
[“”].concat([“val 1”, “val 2”, “val 3”])
);

It works and change the field_name over all the child table; If i want the change only for the current row
upon certain condition??

use below code it works for me

frappe.utils.filter_dict(cur_frm.fields_dict[“childtablename”].grid.grid_rows_by_docname[cdn].docfields, { “fieldname”: “fieldname” })[0].options = bindlisthere;
cur_frm.refresh();

1 Like