>This works great!
>
>In the INIT.METHOD of the embossedfield class I've put the following code.
>Is there anything else that would streamline this?
>
>LOCAL lcArray, lcDotPosition
>lcDotPosition=AT(".",this.controlsource)
>lcField=UPPER(ALLTRIM(SUBSTR(this.controlsource,lcDotPosition+1,255)))
>SELE INVENTOR
>gnFieldcount = AFIELDS(gaMyArray) && Create array
>FOR nCount = 1 TO gnFieldcount
> IF gaMyArray(nCount,1)=lcField
> IF gaMyArray(nCount,4)=2
> this.inputmask="$$9,999.99"
> EXIT
> ENDIF
> ENDIF && Display field names
>ENDFOR
A quicker thing to do would be to write a DBC parser to set the default input mask for some of the fields (should also give you some interactive chance to change some - for one, not all decimal fields should be taken as amounts, some are quantities). Then when you build your forms, the default inputmask would already be there, without any need for runtime checking.