>Type() doesn't seem to work for a table field.
>
It works to see if it's a resolveable reference, but not to get the field's field type. You can use AFIELDS() to extract this information. TYPE() will not distinguish between various numeric types (Integer, Float, Numeric) - it sees them as an 'N' reference; AFIELDS() contains the exact field types.
TYPE() will tell you if the reference is unresolvable as either a field or memvar; it doesn't distinguish between the two, and will take a field in the current work area in preference to a memvar of the same name.