Within a transform map, there’s a number of ways to map data, eg you have field mappings, on before scripts, on after script, the big script box at the top etc.
Without knowing which order these actually are processed, you can find yourself with some unexpected results.
A colleague of mine did the hard work and digging around to find how they’re all ordered, I’m just sharing the sequence here…
Update: WP won’t let me upload a full size image. I think its the theme I’m using. Added an anchor to it so you can click it to view the full size