Transform map to update single record on user table

RudhraKAM
Tera Guru

we have a LDAP integration with AD , we have a requirement where we need to create a new string field on user table to store prefix , 

I created the string field and created a data source with connections and everything is fine , coming to transform map , I am creating a new transform map where we need to update that prefix value for all records if they have any , can also accept Null, but when i try to run the transform instead of updating that one field It is creating records, below is my trasform map 

 

How do i just update that field when a user record is found ?

find_real_file.png

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

why to create another transform map and not create field map in your existing transform map?

coalesce is on user_name so if found it would update; if not found then create

Regards
Ankur

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

what if due to some business need, if we want to create a new transform map? how to deal with this situation? where exactly am I doing wrong? 

 

 

If no user ID match found we need to ignore that , but for me it is still creating the records 

Hi,

if you are having LDAP then definitely for users you would have transform map

we usually get requirements to bring additional AD attribute and map to existing field on user table so we can create field map for that

if match not found and you don't want to insert then use onbefore transform script

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

	// Add your code here
	if(action == 'insert')
		ignore = true;

})(source, map, log, target);

Regards
Ankur

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

@RudhraKAM 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

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