How to copy values from one column field value to antoher column field value?

manojpanda
Giga Contributor

find_real_file.png

Hi Developers,

How can i copy caller field value to priority/state value.

Here in caller field Suppose Abel Tutor has to copy to state filed. How to achieve this?

1 ACCEPTED SOLUTION

Hey manojpanda



Yes it is possible with fix script, Now you are on track and i have already created fix script in my PDI and it's working for me.



Please follow my steps:



Step-1: Navigate to Fix Script ==> System Definition ==> Fix script and Follow the screen shot


find_real_file.png


Step-2:


Crete New fix script with below script and then save it after that   click on Run Fix Script as like mentioned in below screen shot:



var gr = new GlideRecord('incident');  


gr.EncodedQuery('short_description=NULL');  


gr.addQuery();


gr.query();


  while(gr.next())    


{  


var copy1 = gr.getDisplayValue('category');  


gr.setValue('short_description', copy1);


gr.update();   //Save it  


}  



Follow Below screen shot


find_real_file.png



Step-3: Finally Category copied to shot description, final result incident short description updated in below screen shot


find_real_file.png



I hope this will be helpful to you and Please Hit Like and Helpful & Correct Answer




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

View solution in original post

10 REPLIES 10

richelle_pivec
Mega Guru

If your question is hypothetical, here is the article on how to use a background script to copy data from one field to another:



Re: Background script to copy a value from one field to another.



Richelle