title: Mapping a single element to a record using Scripting Functoid
body: <p>I am trying to create a mapping between two different elements(Element1 &amp; Element2) from source schema to the same  record on Destination Schema along with an element in it as shown in the following format. </p>
  
  <pre><code>&lt;coverages&gt;
    //If Element1(Source Schema element) has data
    &lt;coverage&gt;
      &lt;CoverageTypeCd&gt;Data1&lt;/CoverageTypeCd&gt;
    &lt;/coverage&gt;    
  
    //If Element2(Source Schema element) has data
    &lt;coverage&gt;
      &lt;CoverageTypeCd&gt;Data2&lt;/CoverageTypeCd&gt;
    &lt;/coverage&gt;
  &lt;/coverages&gt;
  </code></pre>
  
  <p>I am now trying to check the presence of value on Elements(Source Schema) and then trying to feed it to the scripting functoid. I don’t know how I should produce the entire<br>
  <code>&lt;coverage&gt;</code> node and still send the respective <code>&lt;coverageTypeCd&gt;</code> of that record as shown above. I believe it should be done with Inline XSLT. I really need someone’s help on this. </p>
  
  <p>Thanks in advance.</p>
  
  <p>Please let me know if you need additional details on something.</p>
  
  <p><strong>Update</strong></p>
  
  <p>Hi folks, I found the answer myself. I used <code>Inline XSLT Call template</code> as Script Type and it did the job. I applied this script for different elements on Source Schema to map the Coverage record </p>
  
  <pre><code>&lt;xsl:template name="CoverageTemplate1"&gt; 
    &lt;xsl:param name="Element1" /&gt; 
    &lt;xsl:element name="Coverage"&gt; 
      &lt;xsl:element name="CoverageTypeCd"&gt;
        &lt;xsl:value-of select="$Element1" /&gt;
      &lt;/xsl:element&gt; 
    &lt;/xsl:element&gt; 
  &lt;/xsl:template&gt; 
  </code></pre>
  
  <p>Thanks </p>