Transform Map question - Coalesce

MStritt
Tera Guru

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.

6 REPLIES 6

Prashanth Rejin
Kilo Guru

Hi MStritt,

Please use choice action as ignore on same mapping, then it wont create a new record.

 

Thanks

Prashanth Rejintala

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.

find_real_file.png

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. find_real_file.png

Thanks,

Akshay

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.