- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 10:12 PM
In Transform map iam updating the records(no inserting). If ST validation id is empty then that record is not updating, it is working fine. My requirement is if
1)I'am updating 1000 records if 999 records is having ST.validation_ID, then i don't want to update single record in transform map,(the transform map should not be happen for single record out of 1000 i.e if 1 record is missing validation.ID whole 1000 records should not update.) means the transform map option should not complete.
2)I'am getting messages in system log, is it possible to get the message while doing transform map so that user be able to know that records are not updating because of empty validation ID.
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2017 08:00 PM
is the source field name is ST.validation_ID. Can we replace the dot after ST with underscore like ST_validation_ID and also in you if condition there is a comma after ST.validation_ID. Can you please remove that and try. Can we something like this with nil() function.
(function transformRow(source,map, log, target) {
if(action == 'insert'){
ignore = true;
}
if(source.ST_validation_ID.nil()){
ignore = true;
error = true;
var error_message='Supplier Validation Results field is blank, Please update the field to complete the update';
log.info(error_message);
}
})(source, map, log, target);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 10:54 PM
You can use onBefore Transform map script to check the validation id. Below is an example code.
var id = source.u_name.toString();
var info = "Before the row is transformed, " + id;
log.info( info );
// Make sure a company name has been provided
var tid = new GlideRecord('Table name');
tid.addQuery('validation_field_name', "id");
itd.query();
if(tid.hasNext()){
ignore = true;
info ="Record already there, row ignored! " + id;
log.info( info );
}