AnsweredAssumed Answered

variable.length() does not work in test

Question asked by msnizek on Jun 14, 2016
Latest reply on Jul 13, 2016 by msnizek

Hello,

 

I need to test if the variable content is longer than 1 character, so I created following construction:

<core:choose>
   <core:when test="${filled_variable.length() >1}">
   <gel:parse var="filled_variable_c">
      <ColumnValue name="attribute_id">${filled_variable}</ColumnValue>
   </gel:parse>
   </core:when>
   <core:otherwise>
      <gel:parse var="filled_variable_c">
         <ColumnValue name=""/>
      </gel:parse>
   </core:otherwise>
</core:choose>

I use <gel:log> to print content of this variable and I can see that it has got a value - internal id of project in CA PPM. But the condition is not passed and it goes through the "otherwise".

 

Please have you got any idea how can I test the variable content length?

 

I'd also like to ask if there is a possibility to print variable content length using <gel:log>. For example like this:

<gel:log category="XOG" level="INFO">LENGTH filled_variable: ${filled_variable.length()}</gel:log>

This does not work.

 

My CA PPM version is 14.2.0.237 06 12

 

Thank you all in advance,

Martin

Outcomes