Transform Map question - Coalesce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2022 07:22 PM
We have a web service setup between our Account table and SFDC. In the transform map, we are coalescing on the Account Number on the Account field/value. If input coming from SFDC doesn't contain an Account Number, then it will not update any Account with the SFDC values (ignores the values). What were seeing, is that if the SFDC record does have an Account Number, but the Account doesn't exist, it's creating a new Account. Is there a way for the Transform map to check to see if the Account (Account Number) exists first. If it doesn't, then don't create a new Account and do nothing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2022 07:25 PM
Hi MStritt,
Please use choice action as ignore on same mapping, then it wont create a new record.
Thanks
Prashanth Rejintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2022 07:37 PM
Hi Prashanth,
On the Table Transform Map? Yes, this is ignored. It will ignore if there is no Account Number (Coalesce field). But, in this issue, there is a coalesce value (Account Number). But, there is no Account with that coalesce value (Account Number). In this case, it's creating a new Account. I don't want a new Account to be created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2022 11:03 PM
Hi,
Can you try "run script" option to build ignore logic? This script runs before each row and can ignore record based on logic.
Also refer product documentation for more information.
https://docs.servicenow.com/bundle/paris-platform-administration/page/script/server-scripting/reference/r_TransformationScriptVariables.html
Note - I have not tested below code.
Thanks,
Akshay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2022 06:44 AM
Hi Akshay,
So, this script will look to see if there is an Account with the coalesce value. If yes, then it will update the Account with the values. If No, then it will ignore the values.