Transform Map not working as expected

sankon
Kilo Expert

I am trying to update email, phone and location only if there is no existing value for the field. I see that existing value is being updated by new value. Please let me know if I am missing anything. 

I created a transform map as follow

find_real_file.png

I have the following in my onBefore transform scripts

find_real_file.png

find_real_file.png

 

1 ACCEPTED SOLUTION

Tudor
Tera Guru

Hi Sankon,

If you are using a script to populate the values you should be able to remove all the filed mappings expect the field on which you are coalescing.

Please give it a try and provide feedback.

Hope this helps!

 Tudor 

View solution in original post

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Hello,

If you're trying to populate a reference field...you'd need to be supplying the "sys_id" for the related record. So in your source records, does it contain the instance location sys_id for the u_x_location field?

If not, you'd need to find it, possibly by using whatever information you DO have in the source to query against the location table, find the right record, then use that to set your target accordingly.

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server/no-namespace/c_GlideRecordSco...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @Allen A 

Thanks for the response, I only have the display name of the location.

Ok, so you'd want to gliderecord query your location table using the source location name to find the match and then set the target to the sys_id you found. See documentation I linked above.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!