none
Deleted RRS feed

All replies

  • You could do the decision making on the left of your table functoids.

    Check for the existence of your index, an use the value mapper to send the result to the table functoid.  If the result is false, send in the "NA" value instead.


    If this is helpful or answers your question - please mark accordingly.
    Because I get points for it which gives my life purpose (also, it helps other people find answers quickly)

    Friday, April 7, 2017 11:41 AM
  • Well, the Table Functoids will not help you in this satiation.

    The correct way to do this was provided in the previous thread.

    Sorry, but this won't work...well maybe...but it will be significantly more complicated than the other method.

    Friday, April 7, 2017 1:43 PM
    Moderator
  • Hi,

    I can suggest you an alternate solution , Instead of using Functoid you can use here xslt to achieve your requirement it is easy and you can put any condition.


    Regards

    Abhay Giri

    Mark this reply as answered or vote if this help you.

    Monday, April 17, 2017 12:05 PM
  • Hi Giri Abhay,

    OP doesn't need to use Xslt either, that also will just make it more complicated than necessary.

    I described the solution in one of the other threads.  The problem is the destination Schema.

    Monday, April 17, 2017 1:02 PM
    Moderator
  • Hi John,

    sure you may be right here. but i only suggested an alternate solution. :P

    Thanks

    Abhay 

    Tuesday, April 18, 2017 5:33 AM
  • Hi,

    Use a scripting functoid with either inline og call xslt templete. Connect the functoid to your target root element

     <xsl:template name="CreateDocument" xmlns:ns0="http://Msdn.Integration.Schemas">
        
        <ns0:Root xmlns:ns0="http://Msdn.Integration.Schemas">
          <!-- Copy header-->
          <xsl:copy-of select="/ns0:Root/Header"/>
          <!-- Three Detail records-->
          <xsl:if test="count(/ns0:Root/Details) = 3">
            <xsl:copy-of select="/ns0:Root/Details"/>
          </xsl:if>
    
          <!-- Two Detail records-->
          <xsl:if test="count(/ns0:Root/Details) = 2">
            <xsl:for-each select="/ns0:Root/Details">
              <xsl:copy-of select="."/>
              <Details>
                <ItemSubTotal>NA</ItemSubTotal>
                <Price>NA</Price>
                <LineTaxAmt>NA</LineTaxAmt>
                <CompSequenceNumber>3</CompSequenceNumber>
                <SenderNumber>
                  <xsl:value-of select="/ns0:Root/Details[1]/SenderNumber"/>
                </SenderNumber>
              </Details>
            </xsl:for-each>
          </xsl:if>
    
          <!-- One Detail records-->
          <xsl:if test="count(/ns0:Root/Details) = 1">
            <xsl:for-each select="/ns0:Root/Details">
              <xsl:copy-of select="."/>
              <Details>
                <ItemSubTotal>NA</ItemSubTotal>
                <Price>NA</Price>
                <LineTaxAmt>NA</LineTaxAmt>
                <CompSequenceNumber>2</CompSequenceNumber>
                <SenderNumber>
                  <xsl:value-of select="/ns0:Root/Details[1]/SenderNumber"/>
                </SenderNumber>
              </Details>
              <Details>
                <ItemSubTotal>NA</ItemSubTotal>
                <Price>NA</Price>
                <LineTaxAmt>NA</LineTaxAmt>
                <CompSequenceNumber>3</CompSequenceNumber>
                <SenderNumber>
                  <xsl:value-of select="/ns0:Root/Details[1]/SenderNumber"/>
                </SenderNumber>
              </Details>
            </xsl:for-each>
          </xsl:if>
        </ns0:Root>
      </xsl:template>

    Best Regards

    Rasmus Jaeger


    Tuesday, May 2, 2017 1:05 PM