- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 06:14 AM
Hi ,
Can some one let me know if my below Onbefore transform script is fine for setting Boolean field(Type = True/False) on my Target table when source field has some data.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var srcm = source.u_ci_managed_by;
if(srcm.isNil()){
answer = true;
}
else{
answer = false;
}
})(source, map, log, target);
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 06:49 AM
You could try something like this:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var answer = false;
var srcm = source.u_ci_managed_by;
if (srcm.nil()) {
answer = true;
}
return answer;
})(source, map, log, target);
You just need to make sure to return the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 06:34 AM
see this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2017 06:49 AM
You could try something like this:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var answer = false;
var srcm = source.u_ci_managed_by;
if (srcm.nil()) {
answer = true;
}
return answer;
})(source, map, log, target);
You just need to make sure to return the answer.