Hi Agata,
I am trying to achieve some thing like this :
<Node id="LKP_INS_EMPLOYEE_DMNSN"
type="REFORMAT"
transformClass="com.clover.xforms.RecordTransformDefault">
<attr name="cloverLang:1">
if ("035".equals(${in.0.EMP_TYPE_CD})
|| "075".equals(${in.0.EMP_TYPE_CD}) )
{
${out.0.ORDER_CD} = "Y" ;
}
else {
${out.0.ORDER_CD} = "N" ;
}
</attr>
<attr name="transformClassSpecific:2">com.clover.xforms.ReformatSetDefaults</attr>
</Node>
I am getting an error which says it cannot compile this code. Is there any mistake in the way I am writing this code?
I am trying to achieve some thing like this :
<Node id="LKP_INS_EMPLOYEE_DMNSN"
type="REFORMAT"
transformClass="com.clover.xforms.RecordTransformDefault">
<attr name="cloverLang:1">
if ("035".equals(${in.0.EMP_TYPE_CD})
|| "075".equals(${in.0.EMP_TYPE_CD}) )
{
${out.0.ORDER_CD} = "Y" ;
}
else {
${out.0.ORDER_CD} = "N" ;
}
</attr>
<attr name="transformClassSpecific:2">com.clover.xforms.ReformatSetDefaults</attr>
</Node>
I am getting an error which says it cannot compile this code. Is there any mistake in the way I am writing this code?
-
Hi,
mapping must be the last statement in your code, so you have to create function for getting value:function accept(input){
if (input.eqauls."035" || input.equals."075") return "Y";
else return "N";
}
and then assign it to output field:${out.0.ORDER_CD}:=accept(${in.0.EMP_TYPE_CD});
Please sign in to leave a comment.
Comments 1