Transform Map run script syntax won't work in onAfter/onBefore ?

Nolan4
Tera Contributor

The syntax --> target.city = source.u_city + "(" + source.u_state + ")"; works in run script of a transform map but when I try to run the same syntax through onBefore or onAfter it doesn't work. 

My question is, is the syntax a bit different in Transform scripts(onBefore or onAfter) than it is in Run script ? i.e. do we need to add any update code? 

I had also tried  if (action == 'insert') {
target.city = source.u_city + "(" + source.u_state + ")";

but didn't work. Please suggest, thanks.

5 REPLIES 5

Rahul91
Tera Contributor

you can use the field script to set the values. But not sure on why it does not set the values directly form on Before or on After.