Field_Number_Default_Mask
See Also: Miscellaneous Functions, Number_Default_Mask, Field Masks
Purpose
Returns a number or currency mask for a specific database table and field.
Return Type
Syntax
Use GlobalFunctionsProcedures.pkg
(Field_Number_Default_Mask({hTable}, {iField}, {sMask}))
Where:
- {hTable}: The table number from
filelist.cfgof a database table. - {iField}: The field number of a numeric field in the table specified by
hTable. - {sMask}: Must be a valid DataFlex numeric mask.
What It Does
Field_Number_Default_Mask tailors the passed template mask {sMask} to the passed database table {hTable} and field {iField}. It returns a DataFlex mask string.
Example
Use GlobalFunctionsProcedures.pkg
Open Customer
Procedure Example
String sMask
Integer iField
Handle hTable
Get_FileNumber Customer.Balance to hTable
Get_FieldNumber Customer.Balance to iField
Move (Field_Number_Default_Mask(hTable, iField, "$,*;($,*)")) to sMask
Send Info_Box ("Mask = " + sMask) "Example"
End_Procedure
This example displays the mask string "$,######0.00;($,######0.00)".
Notes
The table referred to by the {hTable} parameter must be open.