18. Working with Data Types and Data Display Formats : String Input Templates
Share this page                  
String Input Templates
String input templates allow you to specify the type, order, and number of characters a user can enter in a data entry field. You can define string input templates only on single‑line character data entry fields. This template is not available for display‑only fields, multi‑line character entry fields, or entry fields with non‑character data types.
The general syntax of a string input template is:
The s indicates this is a string template and the c represents any of the special template characters. You use one special character for each space in the field or column width, up to a possible width of 100. For example, s'naaannn' specifies that the field or column is 7 characters wide and that numbers (n) must be entered in the first and fifth through seventh positions, with alphabetic characters (a) in the second, third, and fourth positions.
You must delimit the template with single (') or double (") quotation marks; single quotes are recommended for consistency with requirements for quoting string constants.