- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 07:34 AM
Hi Experts!
I have a requirement, there is a string field on the target table called "PO number" , I have made that field as Coalesce, while doing the bulk upload if the record found it is updating that record, if record not found it is creating a new record with blank detail, we don't want to create or insert a new record, we just want to update the records.
I have tried with below script in on before script it is not working it is still allowing to insert new record.
if(action =="insert")
ignore =true;
and I have tried with other script as well where I'm querying the target table and searching for the record if not found then ignoring the insertion, that is also not working, kindly suggest me a solution for this.
Thanks in advance,
Chaithanya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 08:38 AM
Hi @Community Alums ,
Hope you are doing good.
Instead of using "ignore = true" in transform map script could you please use the same in run script in transform map record
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2023 11:37 PM
Can't this simply be solved by setting up the following in your transform map script: (note not in a field map)
(function transformRow(source, target, map, log, isUpdate) {
if(action == 'insert'){
ignore = true;
}
})(source, target, map, log, action==="update");
Kr!
Robin