Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 05:12 AM
Hi,
how the value is present in the incoming data i.e. import set table; you can use field map script for this; choice action as ignore
Note: ensure you compare proper values in if condition with the incoming values; also use proper source field
I believe it should be u_priority and not priority
answer = (function transformEntry(source) {
// Add your code here
var targetValue = '';
var sourcePriority = source.u_priority;
if(sourcePriority == 'High')
targetValue = 1;
else if(sourcePriority == 'Medium')
targetValue = 2;
else if(sourcePriority == 'Low')
targetValue = 3;
})(source);
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader