Try ERPNext Buy Support Partners Foundation

Set values into child table

Although i write the following code nothing is entering into the child table…

the code snippet…

and it isn’t showing any error …can anyone help me …


Add console.log() and debug what parameters are you sending as well as what response you get?

Can you explain what are trying to achieve?

where is detials field. If this is a field from your parent form then you have to iterate child table entries to set values in every row of the table.


	detials: function(frm) {
		$.each(frm.doc.tablefieldname || [], function(i, v) {
			frappe.model.set_value(v.doctype,, "email", "")

details is the name of the child table …

i want to set the values for the fields in child table
and the child table is and
sangram ji thank you for your reply

you mentioned detials in your code correct it and try again.

sry i can’t understood what you are saying can you please tell me with the help of a code …
thank you

Explain in details what are you trying? On which event you want to fill the field in a table?

After clicking the button at the top i want to fill the table
is there any function like that the cur_frm.set_value

So, after click on verify button, you want to fill table fields.

try this

	verify: function(frm) {{
			method: "frappe.client.get",
			args: {
				doctype: "User",
				filters: {"email":user}    //user is current user here
			callback: function(r) {
				$.each(frm.doc.details || [], function(i, v) {
					frappe.model.set_value(v.doctype,, "name1", r.message.full_name)
					frappe.model.set_value(v.doctype,, "email",
					frappe.model.set_value(v.doctype,, "phone",

I tried but i am not getting the values in the tables …Thank you …

What is Current_User?
Add console.log in callback and check response


callback: function(r) {

and check this in your browser console

but i am getting the field values for the above three functions…

Thanks i think now i got the solution…I will not forget your help…thank you so much…

sorry for troubling you again …but i want to modify it little bit the code i just write …
i want to store the different users in the same doctype but because of this code it just duplicating all the values whenever the verify button is clicked

Thank you for your reply once again

How you solve this problem… pls help me i’m also get this problem

what is your problem exactly ?
he is using a for each function which iterates each row so he will keep getting the same entry in every row. if thats was your question.

Hello, I have had the same error for months and today I have solved sending the array.

cur_frm.set_value(“field_value”, data.message);

Complete code:{
	method: "frappe.client.get_list",
	args: {
		doctype: "Doctype table childs",
		fields: ["*"],
		filters: [["parent", "=", "name register parent"],],
		parent: "Employee"
	callback: function (data) {
		if(data && data.message) {
			cur_frm.set_value("education", data.message);

Hi ,
How you solve this problem… pls help me i’m also get this problem

Hi @smehata,
Check this out…

can you show your frappe.client.get method?