The CreatorCon Call for Content is officially open! Get started here.

Transform map not working as expected

bpolo
Tera Guru

Hi there

I am integrating with a third party and adding the records retrieved to an import table. I want to transform these records as follow:

Depending on certain data criteria If there is no match to a Security Incident already created in ServiceNow, a new Security Incident should be created. (This piece works correctly)

I then created an onBefore Script to check if the artifact already exists just to update the record.

The secind piece does not appear to work. Please could someone let me know if I am using the correct script "onBefore", and if it is correct, how should I script the code so that a record will be updated and not inserted. Currently my script reads the Security Incidnet and it does find a match, but after that it does not update the record it found. It stores a new record. Any help would be much appreciated. Thanks! 

2 REPLIES 2

AshishKM
Kilo Patron
Kilo Patron

Hi @bpolo , 

For inster its working, that's good. 

For update, does the transform map has any column marked as coalesce = true , the incoming row ( from stage table ) column should match this coalesce column in target table column then it will update.

 

Please check the same and revert with screen shot if not works. 

 

-Thanks,
AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Thanks for your response AshishKM. So we have no coalesce field due to the reason that there are a few ways to match on depending on the data coming in. That is why we needed to script it. Any other thoughts? Thanks!