Copy / Move field values from one table to another

John Oliver Man
Kilo Contributor

Hi,

I have 2 tables:

  • task table (task)
  • reason for change table (u_reason_for_change)

I have fields named "executive summary" and "cause of outage". Once I input one of those in task fields and submit the task, it was not copied in the reason for outage fields named "executive summary" and "cause of outage" also. Can you give me a idea on how to do it? Thanks.

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron
Hi, if you are copying the data to another table and not updating the currect with a relationship to the new record you would use and after business rule. If you want to update a relationship back into the current table you should use a before br so you can update current with details after your related insert. You need a glide query to initialise a new record, map the values you want to populate and then insert the new record.

View solution in original post

18 REPLIES 18

Tony Chatfield1
Kilo Patron
Hi, if you are copying the data to another table and not updating the currect with a relationship to the new record you would use and after business rule. If you want to update a relationship back into the current table you should use a before br so you can update current with details after your related insert. You need a glide query to initialise a new record, map the values you want to populate and then insert the new record.

Dhananjay Pawar
Kilo Sage

Hi,

What you have done so far,Can you share the script here.

Thanks,

Dhananjay

Hi,

 

I want to capture this and will be moved to this:

I used the code above to do that.

John Oliver Man
Kilo Contributor

Hi Tony,

 

I am using a before BR, then my trigger is when executive summary changes. I used this code, but nothing happens.

var rfo = new GlideRecord('u_reason_for_outage');
rfo.initialize();
rfo.u_executive_summary = current.u_executive_summary;
rfo.insert();

 

Can you modify the script or maybe give recommendation on the trigger to call?