- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:08 AM
Hello Experts,
I am using a Field map Source Script, the requirement is to set the impact field on incident table on the basis of incoming priority from the source table.
Ex. if the priority from the source table is 1 then the impact on target incident table should be set to 3-Low( value for this choice is 3).
Written the following but it isn't working.
Can anyone help on this?
Thanks
Khozema
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:28 AM
Yes, you have to select the target field and target table in transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:14 AM
Hi Attar,
Can you please try,
if(source.u_priority == 1)
answer=3;
Thanks,
Maddy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:21 AM
it doesn't Work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:14 AM
You have to write script some thing like below
if(source.u_priority == 1){
return 3; //value of priority in servicnow table
}
else if (source.u_priority == 2){
return 2; //value of priority in servicnow table
}
else
return 3;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 04:16 AM
answer = (function transformEntry(source) {
if(source.u_priority == 1){
return 3; //value of priority in servicnow table
}
else if (source.u_priority == 2){
return 2; //value of priority in servicnow table
}
else
return 3;
})(source);