Yes.  Good to see my dyslexia is working at 100%.

I will sheepishly crawl back under my rock now....

Craig K. Dalrymple
Information Services Consultant (Contractor)
FMI/Unisys Inc. working for
USDA/OCIO/ITS/IOD/NOB
FMI(BPA # AG-3144-B-12-0003)
6501 Beacon Drive
Kansas City, MO 64113
816-926-8819  (W)


-----Original Message-----
From: Sergiu Dumitriu [mailto:sergiu.dumit...@gmail.com]
Sent: Tuesday, October 02, 2012 1:03 PM
To: Velocity Users List
Subject: Re: Having trouble doing math with values retrieved from external data 
source

On 10/02/2012 01:55 PM, Dalrymple, Craig - OCIO-ITS, Kansas City, MO wrote:
> Could the following issue be related to the 1.4 engine, or to the way Cisco 
> has it implemented?
>
> Source:
> #set ($county=$!{dsobj.getValue('Location-CountyName')})
> #set ($county=$county.toLowerCase())
> #if ($county.lentgh() > 8) ## check to see if the county name is longer than 8

Do you really have lentgh instead of length in your code?

>    ! true
>    hostname 
> $county.substring(0,8)$!{dsobj.getValue('Location-FIPSCode')}$!{dsobj.getValue('Device-Instance')}
> #else
>    ! false
>    hostname 
> $county$!{dsobj.getValue('Location-FIPSCode')}$!{dsobj.getValue('Device-Instance')}
> #end
>
> Output:
> ! false
> hostname stelsewhere99
> !
>
> Clearly, the length is more than 8....
>


--
Sergiu Dumitriu
http://purl.org/net/sergiu/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org






This electronic message contains information generated by the USDA solely for 
the intended recipients. Any unauthorized interception of this message or the 
use or disclosure of the information it contains may violate the law and 
subject the violator to civil or criminal penalties. If you believe you have 
received this message in error, please notify the sender and delete the email 
immediately.

Reply via email to