Onbefore Transform map not updating the record, only inserting even though matches with theCondition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 12:47 PM - edited 07-01-2024 12:47 PM
Following is my field map
following is onbefore script
here I am checking if entity and current_ram combination exits, if yes then update the record.
I am mapping ram with the expected ram
if combination does not exits then create new record
for reference this is the table and following is the form
Following is the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 02:14 PM
Hi @Pradeep Patel1 ,
You can just not use a scripted action and just put your u_expected_ram and u_entity as a Coalesce fields, this will have a similar result:
If that doesnt work to you maybe you can try not use a onbefore script and change to just run the script at the start because your script[onBefore] run when the record was already created:
Regards,
Marco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 07:49 PM
Hi @Marco0o1 ,
Tried running through run script still inserting record. I just want to update the record rather than inserting it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 08:18 PM
Hi @Pradeep Patel1
Create a onBefore Transform Script and use the code below:
if(action == 'insert'){
ignore = true;
}
Also make a field coalesce true through which you want to update the record.
Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning
Thanks & Regards
Deepak Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 08:32 PM
Actually I can not use coalesce here, I want to check current_ram column with ram from target table, if combination exists then update it with expected RAM, can I update it in the script rather than Ignoring it.