How to stop updating in transform map field mapping on certain conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2024 07:25 AM
I have a use case where data will be coming from SAP in three rows and if any of the rows having a value in field called block we need to set the value blocked = true in target table field. But I am facing an issue like, if one row updated value to blocked = true and later another row making the value to false again. How to fix this issue in transform map.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2024 08:39 AM
Hi @Raviteja Kunal1 once you are updating blocked=true just return out of loop something like below
if(source.field1 == 'block' || source,field2 =='block' || source,field3 =='block'){
target.blocked=='true'
return;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2024 09:05 AM
thank you @Anantha Gowrara but if another row in the staging table is not having any values it is updating as false again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2024 09:07 AM
@Raviteja Kunal1 can you share your code once
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2024 09:14 AM
This is how I am writing in field map.