Ignoring row in Field Map script

DhananjayM
Tera Guru

Hi,

I have a table with multiple reference fields(both reference & glde_list). In field maps script I can validate that if the said entry has a valid record in system or not. So I can have something like

answer = util.getParentSysId(source.u_refField) // This would involve checking if the refField is a valid option or not.

What I am looking out is a way where in I can ignore a row if it has invalid reference. So internally my script will return a blank or null and that will just set the reference field as null. But why I really looking for is if I can ignore the entire record. And to complicate it further my requirement is to have this logic for multiple fields on the same entity.

I have tried setting ignore = true within util.getParentSysId function, but that doesn't ignore the entire record.

Any pointers on this??

Regards,
Dhananjay

5 REPLIES 5

I want to use standard field map, but instead of mapping it directly to source value I would like to use Field map script for individual fields. There are reason for doing that.

1. Sometimes the reference fields for CIs doesn't abide the domain separation. So in certain cases if I am trying to attach a nic to host of specific company, it just randomly pickups host with same name in a different company.
2. Often the reference field is coalesce which is why its important for that field to be present in TM, otherwise I could easily handle it in onBefore
3. There are certain cases where we do transformation on source data and then try to find out parent. Like for Nic we could have something like Nic1@Hostname populated as name which would be referred by an IP Address.

So in such cases a field map source script gives me flexibility to decide how to lookup a parent, instead of relying purely on name field. Having said that, it would be worth trying out the behavior if we make choice action as reject in TM. However we also have some glide list fields which needs similar handling, but don't have option for adding choice action.

Thanks,
Dhananjay