How to set same target fields with 2 different target table in field map

Gautam Raj
Tera Contributor

I get the below error while trying to set same target field (Virtual) in 2 different target tables under the same transform map.

GautamRaj_0-1740999268012.png

Error - "An existing map to this target field already exist"

 

My requirement is to set the target field "Is Virtual(virtual)" for 2 target tables in the same map. Below are the 2 target tables am trying to map the field to

cmdb_ci_lb

cmdb_ci_netgear

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Gautam Raj 

you have only 1 transform map and you want to set 2 target fields with same source value?

If yes then system is blocking you?

If yes then why not use onBefore transform script for the 2nd field like this

target.fieldName = source.u_is_virtual;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Rohit  Singh
Mega Sage

Hi @Gautam Raj ,

 

Can you share the screen shot of your transform map where you are getting the error?

 

Regards,

Rohit

 

Below is the error which i get when i try to set the field map

GautamRaj_1-1741000078467.png

My requirement is to set the same target field "virtual" which is set for target table "Load Balancer [cmdb_ci_lb]" to the "Network Gear [cmdb_ci_netgear]" table as well which is currently having custom field "u_virtual" set to the map

 

GautamRaj_2-1741000117115.png

 

Hi @Gautam Raj ,

navigate to sys_transform_entry.LIST and check if you've any similar record (same map,same target field)

 

FYI: Ensure unique target field this BR is aborting the action

if no duplicate records found , rename u_virtual name

Ankur Bawiskar
Tera Patron
Tera Patron

@Gautam Raj 

you have only 1 transform map and you want to set 2 target fields with same source value?

If yes then system is blocking you?

If yes then why not use onBefore transform script for the 2nd field like this

target.fieldName = source.u_is_virtual;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader