User Guide > Using Extract Editor > Defining Fields > Adding Field Definition
Was this helpful?
Adding Field Definition
To add a field definition:
1. On the Design tab, highlight the text for which you want to add a field definition, right-click and select New Field.
The Add New Field Definition window is displayed.
The New Field option is enabled even if a line style is not defined on the selected line or there is a line style that has action other than Reject.
When there is no line style matching the selected line, then a new line style is created by default based on the selected text in the Text Viewer and the Add Field Definition window is displayed.
This option is not enabled when multiple lines of text is selected in the Text Viewer.
You can also create a new data field by double-clicking anywhere in the line if there is a line style matching that line. Other fields must not be present at that location. Otherwise, the Edit Field Definition window is displayed for the field present at that location.
2. Specify the following options.
Property
Description
Line Name
Lists all the line styles (excluding the line styles with Reject action) that match the selected line in Text Viewer.
While editing a field definition, it lists all the line styles that contains data fields.
Field Name
Displays the name of the field for which a field definition is being created.
When editing the field, lists all the fields defined in the line style selected in the Line Name drop-down list.
Field Start Rule
Defines the parameters required to identify the beginning of a data field. The available options are:
Fixed Column: Beginning of a data field based on the column number within the line. If you have highlighted a particular part of the line, then this value is populated automatically. It is equivalent to the first highlighted character.
Floating Tag: Beginning of a data field that has a preceding field tag but may appear in different columns within the line of text from one record to the next. Field tag is fixed text or a pattern (regular expression) that marks the beginning of the field.
The following options define how the field tag is processed:
Include Tag: Data in the field includes the specified tag.
Regular Expression: Value specified in the tag is a regular expression.
Use the [ ] tag found starting at column [ ]: In the text boxes, specify the instance of the end tag you want to use (1, 2, 3, and so on) and the column number to begin searching for the defined end tag.
Note:  If Include Tag and Regular Expression are selected, then the text matching the specified pattern is the Floating Tag value.
Field End Rule
Defines the parameters required to identify the end of a data field. The available options are:
Fixed Column: End of a data field based on the column number within the line. If you have highlighted a particular part of the line, then this value is populated automatically. It is equivalent to the index of the last character in the highlighted text.
End of Line: Data field extends to the end of the line.
Floating Tag: End of a data field that has a leading field tag but may appear in different columns within the line of text from one record to the next. Field tag is fixed or a pattern (regular expression) that marks the end of the field.
The following options defines how the tag is processed:
Include Tag: Data in the field includes the specified tag.
Regular Expression: Value specified in the tag is a regular expression.
Use the [ ] tag found starting at column [ ]: In the text boxes, specify the instance of the end tag you want to use (1, 2, 3, and so on) and the column number to stop searching for the defined end tag.
Note:  If Include Tag and Regular Expression are selected, then the text matching the specified pattern is the Floating Tag value.
Data Collection/Output
Determine how the Extract Editor processes the data in this particular field from record to record. When the Extract Editor is collecting data fields, it collects all the fields that have been defined on lines of text whose line action is either Collect Fields or Accept Record and assembles these fields into a data record.
The options in this section determine how data within a data field is handled. The available options are:
Behavior on Accept: Indicates the action after an Accept Record is processed:
Propagate Field Contents: Propagate the field contents from the last accepted section that contained the data in the data field to the section being processed. This is the default and is particularly useful for header information that you want repeated until a new header is encountered.
Flush Field Contents: Flush field contents is the opposite of propagate field contents that is, data is flushed whenever a record is sent to the output.
Trim Leading and Trailing Spaces: If selected, trims the spaces around the field value before including it in the output. This option does not remove spaces within the data and only removes the spaces before and after the data.
Default Field Length:
If the start and end rule does not allow enough space, or if you did not highlight a large enough field, it is possible that the data is truncated in the output. If the data is truncated in the browser or during export, change the default field length.
For fields with Floating Tag in start or end rule, specify a reasonable value to avoid data truncation. By default, the value is 255 for fields with variable length.
For fields with Fixed Column in start and end rule, this value is typically the difference between the Start and End index.
Field’s Accept Record: Lists all the available Accept Records. Selecting an accept record assigns this field to that Accept Record.
3. Click OK.
The new field definition is created and highlighted in the Text Viewer on the Design tab. Only fields with fixed start and end column are highlighted.
4. Repeat this process until you have completed adding all the field definitions.
5. Click File > Save or click to save the extract file.
Last modified date: 12/03/2024