Situation: In the following global variable in data mapping, the requirement is to replace the last two character of the above ("~^") with a carriage return ("\r") in order to insert it to the database field having multiple lines.
"varPBPList" that have value "IF CONDITION{ $varPBP1E > 0 } VALUE=[ concat( $varPBP1E , ' - 18-UAHPEOC-001-E~^' ) ]".
Solution: To replace the character "~^" with a carriage return "\r", follow the given steps:
- Write the below line of code on a custom XSL before of "Record" element in your data mapping.
<xsl:variable name="nl" select="' '"/>
<xsl:variable name = "newline">
<xsl:value-of select="$nl" disable-output-escaping="no"/>
</xsl:variable>
<xsl:variable name="varFinalPBP" select="saxonJavaMapperUtilityClass:replaceAll($varPBPList ,'\~\^' ,$newline)" xmlns:saxonJavaMapperUtilityClass="java:MapperUtilityClass"/> - Now, Map the varFinalPBP to the target node.
Comments
0 comments
Article is closed for comments.