Archive

Archive for the ‘Courion’ Category

Custom Courion Transformation: VB-STRING

December 14th, 2009

I recently ran into a situation where I needed to take the output of a macro and assign it to a variable in a separate VBScript Courion macro.  In order to handle the line returns as well as embedded quotation marks I created a custom transformation.  To implement, simply create a file called CustomTransformations.xml in the CourionService\Transformations Directory, and include the following XML Code:

<?xml version="1.0" encoding="UTF-8"?>
<transformations>
  <!-- VBScript String Adds leading and trailing quotes,
    escapes internal quotes and handles crlf's-->
  <transformation name="VB-STRING">
    <prefix>"</prefix>
    <replacements>
      <replace from="&quot;" to="&quot;&quot;"/>
      <replace from="&#x000d;&#x000a;" to="&quot; &amp; vbcrlf &amp; &quot;"/>
    </replacements>
    <postfix>"</postfix>
    <seperator> &amp; "," &amp; </seperator>
  </transformation>
</transformations>

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Facebook

mike Courion

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.