Problems with If statement inside of foreach loop.
Posted: Thu Mar 17, 2016 6:47 pm
I am somewhat confused as to why I cannot set a simple 'IF' statement in my foreach loop which is inside my convert to Xml.
Here is the perplexing bit -
This is acceptable syntax...
${varData[3]} eq ${varData[1]}
But when I try to use the 'ne' operator it is not acceptable syntax. In point of fact nothing but that actually is acceptable but that is not what I need to compare.
Here are some things I have tried and are all failing.
[8003 - Convert to XML] Invalid value '${varData[3]} ne ${varData[1]}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotEmpty(varData[3])}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotNull(${varData[3]})}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotNull(varData[3])}' for attribute 'test' in element 'if'
Can someone tell me what is wrong with my syntax? What I would really like to do is this -
<if test="IsNotNull(${varData[3]})">
Here is the perplexing bit -
This is acceptable syntax...
${varData[3]} eq ${varData[1]}
But when I try to use the 'ne' operator it is not acceptable syntax. In point of fact nothing but that actually is acceptable but that is not what I need to compare.
Here are some things I have tried and are all failing.
[8003 - Convert to XML] Invalid value '${varData[3]} ne ${varData[1]}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotEmpty(varData[3])}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotNull(${varData[3]})}' for attribute 'test' in element 'if'
[8003 - Convert to XML] Invalid value '${IsNotNull(varData[3])}' for attribute 'test' in element 'if'
Can someone tell me what is wrong with my syntax? What I would really like to do is this -
<if test="IsNotNull(${varData[3]})">