Can we update a target field without coalesce in transform map

Sreeja6
Giga Contributor

how can we update target fields in transform map without coalesce fields can you please let us how can i proceed and my on before script is used to insert and update the records.

 

@Chuck Tomasi @Earl Duque @laurenmcmanamon @Pranav Bhagat @Adam Stout @Laszlo Balla 

4 REPLIES 4

Brian Lancaster
Tera Sage

Why would you not use a the coalesce field?

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

So if there is no coalesce field, how are you attempting to decide which record to update? A combination of multiple fields, or some scripted look-up? What have you tried so far and where do you have issues?

Hi I am having the same issue. I did an onBefore script with a lookup on the Security Incident table. I cant do coalesce as the lookup depends on a combination of fields depending how they are populated. The onBefore script finds the existing records but still goes ahead and creates a new record. I am not sure how to script an update to the target record and then to stop the create process for the same record I updated. 

Thanks in advance!

AbidM
ServiceNow Employee
ServiceNow Employee

Hi @bpolo, you can get the existing record in your onBefore and update the fields in the record.
Additionally, mark ignore=True in onBefore to stop the new record creation when record is present based on your condition.