Expand my Community achievements bar.

Replacing a substring in an xml node with a 'Set Value'

Avatar

Former Community Member

I have a node that looks something like this:

<EmailBody> &lt;p&gt;Ticket {$Tckt_Cd$}&lt;/p&gt </EmailBody>

I want to replace {$Tckt_Cd$} with a variable in the Workflow service. I'm looking for help on this one.

I'm using LC ES 8.2

2 Replies

Avatar

Former Community Member

I would say you have two choices.

  1. Write a DSC to do this
  2. Grab the content of the XML node as a string, say SSS.  Then maybe something like this ... concat(substring-before(SSS, "{$Tckt_Cd$}"), YOUR VALUE, substring-after(SSS, "{$Tckt_Cd$}")) and then write the concatenated value back into your XML

Avatar

Former Community Member

I ended up create an XSLT template and and use Xpath to replace the text I need.