Hi Nadya,
It is written to work with only Numeric data. I am not surprised if it doesn't work with any other datatype.
Bye
Jayesh
>Hi Jayesh,
>
>>>Assuming I know the name of a field and if it is numeric or not. With those two values, what would be the best way to extract the length and the decimal value of that field from the field structure?
>>
>>You can extract the length using FSIZE().
>>
>>How about this small function to get the decimal?
>>
>>LPARAMETER tcFldName
>>LOCAL lcStr
>>lcStr = ALLT(PADL(&tcFldName,100))
>>RETURN IIF(AT(".",lcStr) > 0,LEN(RIGHT(lcStr,LEN(lcStr) - AT(".",lcStr))),0)
>>
>I've just tried. First of all, you don't need to use &.
>This function works with dates, chars and numbers. It doesn't work with logical field.
>
>Thanks.
- Jayesh