In the transformation map, how to fill field opened by in the target table with the logged in user
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2024 01:19 PM
I have a transform map that takes an excel table and transforms it into an occurrence in a table. This table has the field open by. And this field is always filled in as system in ocurrences that were created by import from Excel. I want this field to be filled with the user who imported from excel.
I tried to do it, creating a field map as the image below, but it did not work:
I don't want to do this using Business Rule. I want to do this using transform map scripts. Is there a way to do it?
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2024 08:42 PM
You can use the following script in onBefore transform script-
(function executeTransformMap(source, map, log, target ) {
var currentUser = gs.getUserID();
target.opened_by = currentUser;
})(source, map, log, target);