Get the value from other table

I have 2 tables:

  1. Appraisal Work Plan
  2. Work Plan Review

I want to get value from the 1st table(Appraisal Work Plan) to the 2nd table (Work Plan Review) when I select the 1st table name in link column.

I used the below code in the 2nd table .js file. but sometimes only working.

cur_frm.cscript.work_plan = function(doc, cdt, cdn){
doc.plan_template = [];
method: “”,
source_name: cur_frm.doc.work_plan,
frm: cur_frm


Why is it’s not working properly, please anyone can help me.