DataMapper second pass preprocessing

I’m using an XML file as input, and needing to pass in field content, which itself contains fields from within the model.

<fieldA>World</fieldA>
<content>Hello @fieldA@!</content>

Is there a way to setup the DataMapper, so that the content which gets rendered is “Hello World!”?
I’d call this a second pass, either in rendering or datamapping.

Which is the most efficient and simple technique? May I please get code or mapping examples?

fieldA = 'World'
content = 'Hello @fieldA@!'

Are there existing Javascript operations to interpret and replace this recursive data content?

Hi,
I’m not sure if there’s an easier way, but a way I know that works is you can create a new field in the DataMapper you can use Javascript to assign it the value of the field you want to contain the combined content and to a text.replace. I’ve attached my sample DataMapper.

forum_example.OL-datamapper (3.1 KB)

Best Regards

Justin Leigh