- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 09:58 AM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2018 05:37 AM
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
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
Step-3: Finally Category copied to shot description, final result incident short description updated in below screen shot
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 10:24 AM
I must be grossly misunderstanding the question. Why on earch would you want to copy the value of a User reference into a State or Priority choice field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2018 12:32 AM
Hi Robert,
As i am a learner of SNOW, suddenly this question came into my mind and i asked here. Ok then is this possible to copy the category field data to short description (or) want to show the category value to short description?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2018 05:37 AM
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
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
Step-3: Finally Category copied to shot description, final result incident short description updated in below screen shot
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2018 07:53 AM
I hope its a generic question expecting if if the values could be copied from one field to another field
We have many possible ways to do this in ServiceNow
1) Background script
2) Client Script.
3)Business Rule.
4) API call
4) Event rules