Setting choice action in transform map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018 11:57 AM
Hi ,
In our transform map ,we have string field mapping .But if the input field length in > 10 ,we need to set choice action as reject .How do we achieve this .Please suggest.
We have written the below code on Source field script .But if we give >10 ,its still creating the record.
answer = (function transformEntry(source) {
var temp_customer = source.customer;
if (temp_customer .length == 12)
{
return temp_customer ;
}
else
{
reject =true;
}
// return the value to be put into the target field
})(source);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018 12:21 PM
Yes i have tried it

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2018 12:25 PM
Ok. Lets try this solution.
In the mapping, just map one to one without a script.
Create a Business Rule on the transform map and use below script
var temp_customer = source.customer;
if (temp_customer.length>10)
{
ignore =true;
}
Please mark this response as correct or helpful if it assisted you with your question.