- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2017 08:26 AM
We have a requirement to update a flag x on the user record depending on the value on another field y.
We have 3 options:
1) Write a after BR which executes when the record is updated or inserted and update the flag x depending on y flag - Will get called with every update
2) Scheduled job (nightly) which will run right after the the user records are transformed and get all the records where field y is changed and set the flag x.
3) Write an on After transform script - This might delay the transform
Performance wise which one is better, thoughts ?
Thanks,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 08:18 AM
What you propose is perfectly do-able in the transform map script. You don't need an additional business rule. That's just overhead that can slow down your import.
target.x is available because it's part of sys_user. source.x is what came in from the import.
if (source.x == '1' || source.x == '2' || source.x == '3') {
target.y = true;
} else {
target.y = false;
}
Something like that sounds like a simple approach to what you described. Just make sure "Y" isn't in the field mapping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2017 11:30 AM
Yes X and Y are both fields of the sys_user table.
X is the title, Y is a flag. The idea is if X changes to 1, 2 or 3, flag needs to be set to true value.
since both are part of same transform map, i am not sure if target.x will be available as it is not committed to the DB yet.
I may have to look for BR or scheduled job route ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2017 08:18 AM
What you propose is perfectly do-able in the transform map script. You don't need an additional business rule. That's just overhead that can slow down your import.
target.x is available because it's part of sys_user. source.x is what came in from the import.
if (source.x == '1' || source.x == '2' || source.x == '3') {
target.y = true;
} else {
target.y = false;
}
Something like that sounds like a simple approach to what you described. Just make sure "Y" isn't in the field mapping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2017 11:14 AM
Yup, I thought of that way, but I need to have more conditions to check as there could be many values in the source which can translate to the value of X. Thats why I wanted to see I can do it alternatively. But if thats the only way for now, I can go ahead and do it.
Thanks Chuck !