cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory Check FCC

itabhishek9
Participant
0 Kudos


Hi SDNites,

I have all the fields to be mandatory in target system. Towards the source I am picking the CSV file using FCC. Even if the field has been set as blank value in source file the tag gets generated ( Ex. <field1 /> ). Due to this the mapping is passed succesfully though all the fileds on the receiver side has cardinality 1. One of the way to achiev the same is to do mapping in each field using createif node function but there are quite a lot fields to handle. Please advise if there is any other way to address the same.

Regards,

abhishek

Accepted Solutions (1)

Accepted Solutions (1)

maheswarareddykonda
Active Contributor
0 Kudos

Hi Gupta,

as per my understanding, if you want to remove the empty tags u can use below code

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="node()|@*">

        <xsl:copy>

            <xsl:apply-templates select="node()|@*"/>

        </xsl:copy>

    </xsl:template>

    <xsl:template match="*[not(@*|*|comment()|processing-instruction())

     and normalize-space()='' ]"/>

</xsl:stylesheet>

and in Operational mapping use first above mapping and second use normal mapping

BR,

Maheswarareddy

itabhishek9
Participant
0 Kudos

Thanks Maheswarareddy. It worked.

Answers (1)

Answers (1)

sahithi_moparthi
Contributor
0 Kudos

Hi Abhishek,

     Have you tried Mapwithdefault function.

itabhishek9
Participant
0 Kudos

Hi Sahithi,

Thanks for the response.

I wanted to fail the mapping in case mandatory fields have not been received. while Mapwithdefault will insert the default values if values not received which is not my requirement.

Regards,

Abhishek