1. Qty. Input Mask: 9,99,99,999.999 2. Rate Input Mask: 99,99,999.9999 3. Amount Input Mask: 99,99,99,999.99I have this general concept that I would want to keep all of the above types of fields currency. As VFP does not have user-defined type of field mapping. Just one mapping each for currency, integer, etc.
*** if currency or numeric, float, double, integer IF INLIST(TYPE("THIS.VALUE"), "Y", "N") DO CASE CASE "amount"$LOWER(THIS.COMMENT) OR "amt"$LOWER(THIS.COMMENT) THIS.INPUTMASK = goApp.GetSetting("General", "Amount Format", "99,99,99,999.99") CASE "quantity"$LOWER(THIS.COMMENT) OR "qty"$LOWER(THIS.COMMENT) THIS.INPUTMASK = goApp.GetSetting("General", "Quantity Format", "9,99,99,999.999") CASE "rate"$LOWER(THIS.COMMENT) THIS.INPUTMASK = goApp.GetSetting("General", "Quantity Format", "99,99,999.9999") ENDCASE ENDIF1. I know I can have different class for different type of numeric value, but VFP won't ease things if all the fields are currency (there are clients who will want more or less decimals, in special cases on-the-fly).