How to get entire child table row value

Hi Guys,
Can you guys help me…i need to get the entire previous row values of a child table and change values of a particular field of the previous row if null when add new row button is clicked

if u are doing this using client side script, you can access the value in table using frm.doc.tablename → get length of table → get the n-1 value using idx variable ( idx = row number ). then use frappe.model.set_value to set value in any field u want

Thank you for the reply
Can you please give the syntax for the “frappe.model.set_value” , here where should i put the condition for idx and the field name

add the trigger on tablename_add → then run the func to check the idx value and logic for the field changes.

1 Like

Thanks a lot… that worked!!