You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Daniel Abrecht <da...@nowhow.ch> on 2007/02/22 15:50:59 UTC

OfBiz Minilang How to check the length of a parameter

How can i check the length of a parameter with the 
<if>
<condition></condition>
</if>

I have a string parameter which should not be longer than 80 characters ->
if it is, i'd like to show a error

thanks for helping me

daniel
-- 
View this message in context: http://www.nabble.com/OfBiz-Minilang-How-to-check-the-length-of-a-parameter-tf3273185.html#a9101256
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: OfBiz Minilang How to check the length of a parameter

Posted by Chris Howe <cj...@yahoo.com>.
Try...

<if>
  <condition>
    <if-compare operator="less" field-name="${bsh:myField.length()}"
value="80"></if-compare>
  </condition>
  <then>

  </then>
</if>


--- Daniel Abrecht <da...@nowhow.ch> wrote:

> 
> How can i check the length of a parameter with the 
> <if>
> <condition></condition>
> </if>
> 
> I have a string parameter which should not be longer than 80
> characters ->
> if it is, i'd like to show a error
> 
> thanks for helping me
> 
> daniel
> -- 
> View this message in context:
>
http://www.nabble.com/OfBiz-Minilang-How-to-check-the-length-of-a-parameter-tf3273185.html#a9101256
> Sent from the OFBiz - User mailing list archive at Nabble.com.
> 
>