Transform Map: To reject the record with error message

Mohammed Hyder2
Kilo Expert

Hi All,

I have created a field on the transform map and marked coalesce and made it to reject if that value is not present in the target table, can I have a specific message saying that 'The data is not present in the target table so the row got rejected '

 

5 REPLIES 5

Pratiksha Kalam
Kilo Sage

Hello,

You can add custom error message in transform map script for below type:

OnBefore(),OnAfter()

Do you have script or you are just creating simple transform map?

https://old.wiki/index.php/Transform_Map_Scripts

 

Thanks,
pratiksha

Hi ,

I just created simple transform maps, now i need to add that message

Hi,

In your transform map, write onAFter transform map, which execute on every row. There you can do your validation and if it fails, put a message

gs.addErrorMessage("your own error message");

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP

Hello,

 

if(source.field_name == ''){

 

log.info("Created new spkg: );
or log.warn("Message") }

}

if(action == 'insert'){

ignore = true;

}

Refer below link,

https://community.servicenow.com/community?id=community_question&sys_id=835bc721db9cdbc01dcaf3231f96...

 

Thanks,

Pratiksha