pass variables in transform map

ryadavalli
Tera Expert

Can we pass variable/arrays within transform map field maps or from onStart scripts to field maps?

6 REPLIES 6

lks
ServiceNow Employee
ServiceNow Employee

Hello Ravali,



Try building your array in Transform Map script (instead of onStart) where you can also perform the field mapping action by passing values from your array to target field respectively. Let me know if it helps.


MGanon
Tera Guru

Hi ryadavalli,
Did you get your answer. I read in another community post that, instead of setting variables to use later in the transform map for fields or onBefore scripts on the "target" record to be imported, the script of the transform map can directly set the target values. That brings me to you same place that I think stopped you. I want the transform map to call a Script Includes so I can reuse the code. That does not work. If you answered your question them please let me know how. If not then I can post more details of what stopped me.