- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021 10:25 AM
We are trying to set a field value to "True" before the data is added to the target table. The imported data does not have a value for the field but the field does exist on the Import Set Table. So the question is how can we set a records value or a field before inserting it into the target table.
My attempt
When "onBefore"
Transform Scripts:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
If (activity == 'insert' || activity == 'update');
target.import_flag = "true";
})(source, map, log, target);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021 12:51 PM
When I added a gs.info line I found that the system wanted me to declare field as a variable. When I did that the value was accepted.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var u_import_flag ='';
target.u_import_flag = true;
})(source, map, log, target);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2021 12:51 PM
When I added a gs.info line I found that the system wanted me to declare field as a variable. When I did that the value was accepted.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var u_import_flag ='';
target.u_import_flag = true;
})(source, map, log, target);