Gets or sets the data type format which determines which characters are allowed for user input.
object.Format = [value]
Where object is an object expression that evaluates to one of the controls in the Applies To list, and value is a value or constant as described in Settings.
Introduced for Datagrid columns in Version 10.6.1.
This property is used to define the data type format for inserted controls in
While it is possible to edit this property for automatically generated host field controls, it is not recommended, as you may unintentionally restrict input or allow the input of invalid characters to the host application.
It is worth noting that in order to provide support for unicode you will need to use the Format type FormatDbcsGraphic (G type) in conjunction with a relevant unicode CCSID (e.g. code page 1200).
The following constants can be used anywhere in macros or scripts in place of the actual values.
If you are retrieving the value of a property or parameter, scripts or macros will return the integer value, whereas Inspector will display the constant equivalent.
When using constants in the script editor, each constant must be prefaced by nl.
The settings for value for the combo box, date combo box, numeric combo box and text box controls are :
Constant (Macros) |
Constant (Scripts) |
DDS Data Type |
Value |
Description |
FormatAlphaShift |
nlFormatAlphaShift |
A |
0 |
All characters are valid for entry |
FormatAlphaOnly |
nlFormatAlphaOnly |
X |
1 |
Allow alphabetic characters, space (‘ ‘), comma (‘,’), period (.), and hyphen (‘-‘) only |
FormatNumShift |
nlFormatNumShift |
N |
2 |
All characters are valid for entry |
FormatNumOnly |
nlFormatNumOnly |
Y |
3 |
Allow numeric characters, space (‘ ‘), comma (‘,’), period (‘.’), plus (‘+’), minus (‘-‘), and slash (‘/’) only |
FormatKatakanaShift |
nlFormatKatakanaShift |
W |
4 |
Allow all Katacana characters |
FormatDigitsOnly |
nlFormatDigitsOnly |
D |
5 |
Allow numeric characters only (no special keys or blanks) |
FormatMagStripe |
nlFormatMagStripe |
|
6 |
Allow magnetic stripe |
FormatSignedNum |
nlFormatSignedNum |
S |
7 |
Allow numeric characters, space (‘ ‘), plus (‘+’), and minus (‘-‘) see note below # |
FormatDbcsOnly |
nlFormatDbcsOnly |
J |
8 |
OA fields only - Allow alphanumeric (DBCS Only) characters |
FormatDbcsOpen |
nlFormatDbcsOpen |
O |
9 |
OA fields only - Allow alphanumeric (DBCS Open) characters |
FormatDbcsEither |
nlFormatDbcsEither |
E |
10 |
OA fields only - Allow alphanumeric (DBCS Either) characters |
FormatDbcsGraphic |
nlFormatDbcsGraphic |
G |
11 |
OA fields only - Allow alphanumeric (DBCS Graphic) |
FormatDate |
nlFormatDate |
L |
12 |
Allow Date |
FormatTime |
nlFormatTime |
T |
13 |
Allow Time |
# In DDS, signed numeric fields restrict input to numbers 0 through 9 only. Negative numbers are handled by entering a number and pressing the Field- key. Newlook allows users to specify negative values in signed numeric fields by entering a negative sign to the right of the number. Newlook then converts this internally and sends the appropriate data back to the host.
When using constants in the script editor, each constant must be prefaced by nl.
MaxLength property | Text property | PasswordChar property | CCSID property
Combo box control | Date combo box control | Text box control | NumericCombo control | Datagrid Column object
© 2004-2021 looksoftware. All rights reserved.