- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 11:07 AM
I have a Transform map with multiple field maps, but want to perform an update on only one field map and ignore the rest depending on a certain field's value in the target table.
For example, in my test user table, if the u_test field is empty then only the phone field should be updated. But if the u_test field has a value, then the whole record should be updated as normal.
if(target.u_test == ''){
target.phone = source.u_phone;
ignore = true;
}
I tried this in an onBefore script, so the value would get set and then hoped it would ignore the rest of the field maps for the record, but it still just ignored the whole record and did not update.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 11:20 AM
Setting ignore = true is going to skip the line for the update in the on before. For a simple solution, you could always just add a second transform map for your import where the phone is updated for items that have a value in the u_test field (or just let it run for everything if it doesn't matter if the phone gets compared a 2nd time as it should ignore it).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 11:20 AM
Setting ignore = true is going to skip the line for the update in the on before. For a simple solution, you could always just add a second transform map for your import where the phone is updated for items that have a value in the u_test field (or just let it run for everything if it doesn't matter if the phone gets compared a 2nd time as it should ignore it).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 11:32 AM