Coalesce without creating records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2014 02:04 PM
I am trying to update our users with their room numbers from a excel file with coalesce on the User's ID. The problem is there are a lot of extra users on this Excel spread sheet and when I run the transform it is creating new users for every user id it cannot find a match to. How do I use the coalesce option to update existing records and not create new records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2014 10:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2014 10:12 AM
Hi Jared,
You can make choice action as ignore in field maps.
If you still have issues you can paste the above mentioned script in transform script.
Thanks,
Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2014 12:58 PM
so I added the code "if (action == 'insert') ignore = true;" to the onBefore script field in the transform map as it says to on the wiki link provided. Now when I run it it does not change any values. I deleted a few of the unwanted Users it created from ServiceNow and changed a few Room number values on the spread sheet and tried it again with the script this time and now it is not creating the additional Users it cannot find a match for (which is good) but it is also not updating or inserting any values that I changed on the spreadsheet for the test. This seems like it should be simple. I only have two columns in the spreadsheet, User ID and Room number, and I'm matching them to two fields on the sys_user table with coalesce set on the User ID field. I must be missing something small and stupid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2014 03:55 AM
0. What does the transform report say - number of records inserted/updated/skipped?
1. Is there anything about the import in the logs: System Logs > System Log > All?
2. Does the import set table look right - does it correctly reflect contents of the spreadsheet?
3. Are you missing a "u_" prefix on any source or destination fields in the transform map?
Might be time for a screenshot of the transform map, including field map table.
You are right, this should be simple.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2018 01:53 AM
I think you're supposed to add this code in the script field on the transform map itself, which will become visible when you check the run script check box on the form. And not from a related transform script.