GetFieldFormat()
Summary
Returns the format string used to display a numeric field.
Syntax
field_format = GetFieldFormat(string field_spec)
| Argument | Contents |
|---|---|
| field_spec | A field spec |
Returns
A string indicating the format used to display the field, or null if the field has no format string or if the field is string-typed.
Notes
-
The format string is used to format the field's numeric values when displayed in a editor. For the details of the formatting, see Format().
-
When a view is exported (using ExportView()), the format string is ignored.
-
The format string can be set or changed with SetFieldFormat().
-
The format string overrides the number of decimals specified for the field (see GetFieldDecimals() and SetFieldDecimals()).
Example
fmt = GetFieldFormat("Employee.PayRate")
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The input field specification is ambiguous |
| NotFound | The input field does not exist |
See Also
| Function | Summary |
|---|---|
| Format() | Formats a number |
| SetFieldFormat() | Changes the way a numeric field is formatted |
| GetFieldInfo() | Returns the data type, display width, decimals, and index flag for a field |