Adrian,

Thanks for the reply.

Is there a reason we default to converting from a String to a Long?  The
example I gave is reading records from a VARCHAR field in a database.  It
seems like that should be a String be default.  I'm probably not
understanding the benefit for the automatic cast.


Brett

On Tue, Jan 20, 2009 at 12:06 PM, Adrian Crum <[email protected]> wrote:

> Try
>
> <Set field="passedVal">
> from-field="someMap._${surveyResponseOptionAnswer.surveyOptionSeqId}"/>
>
> or
>
> <Set field="passedVal"> from-field="someMap["_" +
> surveyResponseOptionAnswer.surveyOptionSeqId]"/>
>
> The idea is to make the key something other than numeric.
>
> If keys like "_000" cause a problem elsewhere in the code, then try
>
> <Set field="passedVal">
> from-field="someMap[str:toString(surveyResponseOptionAnswer.surveyOptionSeqId)]"/>
>
> -Adrian
>
>
>
> Brett Palmer wrote:
>
>> Here is an example:
>>
>> <Set field="passedVal"
>> from-field="someMap.${surveyResponseOptionAnswer.surveyOptionSeqId}"
>> />
>>
>>
>> Where surveyOptionSeqId is 000 but translates to 0.  Then doesn't
>> match the key value in the map.
>>
>> Brett
>>
>>
>> On 1/20/09, Adrian Crum <[email protected]> wrote:
>>
>>> Brett,
>>>
>>> Could you provide a code snippet?
>>>
>>> -Adrian
>>>
>>> Brett Palmer wrote:
>>>
>>>> I saw some posts on this earlier but not sure of the exact syntax.  We
>>>> have
>>>> some SimpleMethod that use index keys like "000", "001", etc.  This are
>>>> being converted to longs and no longer work in our Maps.  What is the
>>>> SimpleMethod syntax to preserve the String value "000" instead of
>>>> changes
>>>> to
>>>> a long.
>>>>
>>>>
>>>> Brett
>>>>
>>>>
>>

Reply via email to