IField

What it does

A document field. The type of the field can be determined based on the Type property. For table fields, the Rows and Cell object methods are available.

Methods

Definition Description
AddRegion( page : IPage, rect : string ) : IFieldRegion

Adds a region with the specified coordinates to the field. rect is a description of a rectangle formatted as [left,top,right,bottom]. This method requires write permissions for the IField object.

Sample code

Note: This method isn't available for tables. To delete a region, use the IFieldRegion.Delete() method.

Cell( columnName : string, rowNum : int ) : IField Retrieves a table cell by the column name and the row number. Available for tables only. Unavailable in script rules.
CheckRules( ) Checks rules for the given field and its children. Cannot be used in rules.
Field( Path : string) : IField Search of the child element relative to the given element. Relative paths are used. Only synonyms of field names as they are defined in the rule settings can be used in rules.
GetLangs() : IVARAIANTArray

Returns the IDs of the languages detected in a field.

Example

HasField( parameter : string) : bool Checks whether the field with the specified path exists. Relative paths are used. Only synonyms of field names as they are defined in the rule settings can be used in rules.
Suggest( VARIANT newSuggest )

Adds a prompt to the field.

Note: Can be in the form of value or string. Added values are written with four decimal places.

For example, the method field.Suggest( "12.90" ) adds the prompt in the form of "12.90", while field.Suggest( 12.90 ) adds the prompt as 12.9000.

Properties

Name Type Access Description
Caption string Read-only The name of the field displayed on the form. The value of this property may be the same as the Name property.
Children IFields Read-only Child items of the field (cells for tables). Unavailable in script rules.
FullName string Read-only A full field name relative to the document. A unique identifier of the field in the document. Can be used for search of document fields through the Field method. In script rules the returned value coincides with Name and is not unique.
HasRuleError bool Read/write

Specifies whether a rule warning or error is associated with the field.

Note: In script rules this property specifies whether to display the field in the error message.

A rule includes a collection of fields specified in the rule properties dialog box. If the rule check fails, an error message (specified in IRuleContext.ErrorMessage) and links to the fields from the collection are displayed in the document editor. Setting this property to false excludes the field from the list of links associated with the error.

IsExportable bool Read-only Specifies whether the field is intended for export (according to the Document Definition settings).
IsIndexed bool Read-only Specifies whether the field is indexable. If yes, the field value can be available from document and page external fields of the Document Definition.
IsMatched bool Read-only Specifies whether the field is matched.
IsSuspicious bool Read-only Specifies whether the field value is certainly recognized.
IsValid bool Read-only Specifies if the field has no format errors.
IsVerified bool Read/write

Specifies whether the field is verified.
Note: The property does not work for field groups.
The property can be set to true in rules even without "write" permissions for the field. To deselect the flag, "write" permissions are required.

If the flag is true, the field is displayed gray in the document editor, as if it were already confirmed. If the flag is false, the field is displayed white and needs to be confirmed. Once the field is verified, the flag is set to true.

Note: Setting this flag to false does not provide routing the field to the Data Verification stage. For this, use the NeedVerification property of the IField or ICharacterParams interfaces.

IsVisible bool Read/write Specifies whether the field should be reflected in document layout (according to the Document Definition settings).
Items IFields Read-only Instances of the field (rows of table fields).
Name string Read-only The field name in Document Definition.
NeedVerification bool Read/write

Specifies whether the field itself (not its characters) needs verification.

If the flag is true, the field is displayed against a red background in the document editor which means that the field needs verification. If the Send to field verification option is selected in the field properties, the field will be routed to the Data Verification stage. Once the field is verified, the flag is set to false.

To specify, whether particular characters, but not the whole field, need verification, use the NeedVerification property of the ICharacterParams interface.

ReadOnly bool Read-only Specifies whether the field has "read-only" permissions (according to the Document Definition settings). When used in rules, indicates that the rule has "write" permission for the field.
ReadOnlyInForm bool Read/write Specifies whether the field on the form has "read-only" permissions (according to the Document Definition settings).
Regions** IFieldRegions Read-only An array of field regions. Overflowing fields can have several regions.
Rows IFields Read-only A set of table rows. Unavailable for non-table fields.
Symbols ICharactersParams Read-only Detailed information about the symbols properties.
Text string Read/write The text representation of a field value.
Type TExportFieldType Read-only The type of a field.
Value VARIANT Read/write The value of the field in the form of VARIANT. The property returns an object of type Int32, if the settings of the field state that it contains an integer and its absolute value is not greater than 2147483647. If the absolute value of the field is greater than 2147483647, the property returns an object of type double.

** - The property is unavailable if the Advanced XML Export option in the license properties is deselected.

25.09.2020 9:24:45


Please leave your feedback about this article