Transform map - more than one target records exists

Colleen
Tera Expert

I've created a transform map with 3 coalesce fields.  The student field on the target table is a reference field.  The source field value may not have a matching record in the student table. The field map choice action is set to reject if the source field value is invalid.  See image below.

 

coalesce_reject.png

 

Apparently, this warning message is being generated for each record where the source student_id is invalid.

 

More than one target records exists for target table <table name> with query ...

The problem is that there can be a lot of those warning messages, so I was looking for a way to prevent them being generated.

 

I tried setting ignore = true in an onBefore script if the source student_id is invalid.  There is a comment on the source record that the row transform was ignored by the onBefore script but the warning message is still being generated. According to this article, coalesce fields are processed before onBefore scripts are executed, so that is apparently expected behaviour.

ignored_by_onbefore.png

 

 

Is there any way I can stop warning messages being generated if the coalesce field is invalid?

 

 

 

 

 

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Colleen 

only workaround I believe is don't use field maps at all and handle every logic of insert/update in onBefore transform script itself.

Advantages

1) Complete Control: This approach gives you full control over how each record is processed, including managing reference validations, coalescing logic, and rejecting or ignoring records as needed.

2) Suppress warnings: Since no coalesce field validation occurs automatically, you will bypass built-in warnings related to invalid reference values, avoiding the warning floods you want to prevent.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader