Transform map to update single record on user table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 03:51 AM
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 06:56 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 07:17 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2022 07:56 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 12:02 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader