Dynamic Coalesce field in the Transform Maps

rahulrockkk
Tera Contributor

Hi Team,

Is there any way to set the "Coalesce" field to true based on the source value in the transform maps? Dynamically setting the "Coalesce" field to true or false based on the value received in the source field. Please provide your support as soon as possible.

 

Regards

Rahul

16 REPLIES 16

Hi Sai,

Thanks for the response. Is that possible to write the logic in the transform map onBefore script without coalesce field matching value?

-O-
Kilo Patron
Kilo Patron

You can do this by adding a field map for sys_id and making it a scripted field map. Than in the script you look up the record that matches a target record and return that record's sys_id. The system will update that record with all other data. In case you don't find a matching record, and the system should create a new record instead, you should just return a random sys_id.

Have recently answered a question on the subject: https://community.servicenow.com/community?id=community_question&sys_id=6b18a404db21741013b5fb24399619b1