on 04-24-2015 7:58 AM
Hi,
this is my source structure and the validations can any one provide me the UDF.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="XYZ">
<ns0:ABC>
<ns0:GrpHdr/>
<ns0:OrgnlGrpInfAndSts>
<ns0:GrpSts>ACTC</ns0:GrpSts>
<ns0:StsRsnInf>
<ns0:AddtlStsRsnInf>FIDESFEEDBACK</ns0:AddtlStsRsnInf>
</ns0:StsRsnInf>
</ns0:OrgnlGrpInfAndSts>
<ns0:TxInfAndSts>
<ns0:TxSts>ACTC</ns0:TxSts>
</ns0:TxInfAndSts>
<ns0:TxInfAndSts>
<ns0:TxSts>RJCT</ns0:TxSts>
</ns0:TxInfAndSts>
<ns0:TxInfAndSts>
<ns0:TxSts>PDNG</ns0:TxSts>
</ns0:TxInfAndSts>
</ns0:ABC>
</ns0:Document>
this is the condition:
Source Field :- <Document><ABC><TxInfAndSts><TxSts> --->
Pass value as is if <Document><ABC><OrgnlGrpInfAndSts><StsRsnInf><AddtlStsRsnInf> consists of “FACK”, “FBACK”, “F900” or “F199”
ELSE
If PDNG, then pass PDNG ----- Target Field.
Just use simple if then clause in UDF..(this can be achieved with graphical functions too)
if (var1.contains("FACK") || var1.contains("FBACK”) || var1.contains("F900") || var1.contains("F199”)) {
return var1;
}
else if (var1.contains("ACSC") || var1.contains("ACSP”) || var1.contains("ACTC") || var1.contains("ACWC”) || var1.contains("ACCP”) )
return "ACCP";
}
else if (other conditions)
{
return
}
else
{
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.