Show / Hide Table of Contents
  • BC HTML Api reference
    • html-api
      • AnnotationArrowOrientation
      • AnnotationTextAlignment
      • AnnotationTextFontFamily
      • BarcodeOrientation
      • BarcodeThresholdMode
      • BarcodeType
      • BatchEnums
        • Mode
        • Queue
      • CallContext
      • DbClient
      • DbServer
      • FileMimeType
      • FileType
      • IAnnotation
      • IAnnotationProperties
      • IApplication
      • IBarcodeData
      • IBaseControl
      • IBatch
      • IBatchClass
      • IButton
      • ICheckBox
      • IComboBox
      • ICustomThemeConfig
      • IDocument
      • IDocumentClass
      • IField
      • IFieldValidation
      • IFileInfo
      • IFolder
      • IFolderClass
      • IFormType
      • IGroup
      • IIndexClass
      • IITModule
      • IJob
      • ILabel
      • ILicenseGroup
      • IListItem
      • IListView
      • ImageColorMode
      • ImageOperationType
      • INode
      • INodeComment
      • INodeReviewComment
      • INuanceEngineConfig
      • IOCRConfiguration
      • IPage
        • Side
      • IRadioButton
      • IRecognitionProfile
      • IRectangle
      • IRegexValidation
      • IScanProfile
      • ITable
      • ITabView
      • ITextBox
      • IthConfig
      • ITitledPanel
      • IUser
      • LevelName
      • NodeReviewStatus
      • NuanceEngine
      • NuanceLanguage
      • NuanceMode
      • PageSideMode
      • RecognitionEngine
      • RpcService
      • ScanService
      • ScanSource
      • ScriptActionType
      • ScriptResultConsts
      • ScriptResultProp
      • UnloadReason

Interface IField

Represents an Index Field of an object (INode) in a Batch.

Note: Write-access to properties depends on the context in which the model is used. When in a read-only context, set* methods will throw an Error.

Properties list

dataType dateTimePattern defaultValue displayLabel displayTip hidden length multiValue name parsedValue readOnly required review reviewDetails scale sqlType sticky table value valueAsListItem valueCount

Methods list

dateFormatIncludesTime() getCommitValue(useDescriptionIfValueIsEmpty) getCommitValueAsObject(useDescriptionIfValueIsEmpty) getCommitValueAsObjectAt(index, useDescriptionIfValueIsEmpty) getCommitValueAt(index, useDescriptionIfValueIsEmpty) getDataType() getDateTimePattern() getDefaultValue() getDisplayLabel() getDisplayTip() getFieldValidations() getLength() getName() getOptions() getOptionsAt(index) getParsedValue() getParsedValueAt(index) getReview() getReviewAt(index) getReviewDetails() getReviewDetailsAt(index) getScale() getSqlType() getTable() getType() getValue() getValueAsListItem() getValueAsListItemAt(index) getValueAsObject() getValueAsObjectAt(index) getValueAt(index) getValueCount() isHidden() isList() isMultiValue() isReadOnly() isRequired() isSticky() isValid(value) setParsedValue(value) setReview(value) setReviewAt(index, value) setReviewDetails(reviewDetails) setReviewDetailsAt(index, reviewDetails) setValue(value) setValueAt(index, value)

Properties

dataType

see IField.getDataType()

Declaration
readonly dataType: string;
Property Value
Type Description
string

dateTimePattern

see IField.getDateTimePattern()

Declaration
readonly dateTimePattern: string;
Property Value
Type Description
string

defaultValue

see IField.getDefaultValue()

Declaration
readonly defaultValue: string;
Property Value
Type Description
string

displayLabel

see IField.getDisplayLabel()

Declaration
readonly displayLabel: string;
Property Value
Type Description
string

displayTip

see IField.getDisplayTip()

Declaration
readonly displayTip: string;
Property Value
Type Description
string

hidden

see IField.isHidden()

Declaration
readonly hidden: boolean;
Property Value
Type Description
boolean

length

see IField.getLength()

Declaration
readonly length: number;
Property Value
Type Description
number

multiValue

see IField.isMultiValue()

Declaration
readonly multiValue: boolean;
Property Value
Type Description
boolean

name

see IField.getName()

Declaration
readonly name: string;
Property Value
Type Description
string

parsedValue

see IField.getParsedValue(), IField.setParsedValue()

Declaration
parsedValue: string;
Property Value
Type Description
string

readOnly

see IField.isReadOnly()

Declaration
readonly readOnly: boolean;
Property Value
Type Description
boolean

required

see IField.isRequired()

Declaration
readonly required: boolean;
Property Value
Type Description
boolean

review

see IField.getReview(), IField.setReview()

Declaration
review: boolean;
Property Value
Type Description
boolean

reviewDetails

see IField.getReviewDetails(), IField.setReviewDetails()

Declaration
reviewDetails: string;
Property Value
Type Description
string

scale

see IField.getScale()

Declaration
readonly scale: number;
Property Value
Type Description
number

sqlType

see IField.getSqlType()

Declaration
readonly sqlType: number;
Property Value
Type Description
number

sticky

see IField.isSticky()

Declaration
readonly sticky: boolean;
Property Value
Type Description
boolean

table

see IField.getTable()

Declaration
readonly table: ITable;
Property Value
Type Description
ITable

value

see IField.getValue(), IField.setValue()

Declaration
value: string;
Property Value
Type Description
string

valueAsListItem

see IField.getValueAsListItem()

Declaration
readonly valueAsListItem: IListItem;
Property Value
Type Description
IListItem

valueCount

see IField.getValueCount()

Declaration
readonly valueCount: number;
Property Value
Type Description
number

Methods

dateFormatIncludesTime()

If this field is of type TIMESTAMP or DATETIME, it will return true if there is a time pattern.

Declaration
dateFormatIncludesTime(): boolean;
Returns
Type Description
boolean

getCommitValue(useDescriptionIfValueIsEmpty)

This is a utility method for those cases where this is a list field (e.g. isList() returns true). It provides a uniform way to get the 'commit' value of a field.

List fields have an associated/backing array of value/description items (ListItems) and the 'commit' value is the 'value' attribute of the ListItem.

Declaration
getCommitValue(useDescriptionIfValueIsEmpty: boolean): string;
Parameters
Type Name Description
boolean useDescriptionIfValueIsEmpty

since list fields may have one attribute instead of two (e.g. only have 'description' instead of 'value/description'), setting this to true will use the 'description' as the commit value (since the 'value' attribute does not exist).

If this is set to false and no 'value' attribute exists, the returned value will be an empty String.

If you want to make sure that this method always returns a value, set this parameter to true.

Returns
Type Description
string

the 'commit' value of this field

getCommitValueAsObject(useDescriptionIfValueIsEmpty)

This method uses the same logic as the IField.getCommitValue() method but tries to parse the String representation and return an Object.

Declaration
getCommitValueAsObject(useDescriptionIfValueIsEmpty: boolean): any;
Parameters
Type Name Description
boolean useDescriptionIfValueIsEmpty

see IField.getCommitValue()

Returns
Type Description
any

this method may return null if there is no 'value' attribute and the useDescriptionIfValueIsEmpty parameter is set to false.

getCommitValueAsObjectAt(index, useDescriptionIfValueIsEmpty)

This method uses the same logic as the method but tries to parse the String representation and return an Object.

Declaration
getCommitValueAsObjectAt(index: number, useDescriptionIfValueIsEmpty: boolean): any;
Parameters
Type Name Description
number index
boolean useDescriptionIfValueIsEmpty
Returns
Type Description
any

getCommitValueAt(index, useDescriptionIfValueIsEmpty)

For the case of multi-value Index Field, this method returns the commit value of the given row.

see IField.getCommitValue()

Declaration
getCommitValueAt(index: number, useDescriptionIfValueIsEmpty: boolean): string;
Parameters
Type Name Description
number index
boolean useDescriptionIfValueIsEmpty
Returns
Type Description
string

getDataType()

Returns the data type of this Index Field. The following are the possible values:

  • String
  • Date
  • Time
  • Float
  • Double
  • Integer
  • Short
  • Numeric

Declaration
getDataType(): string;
Returns
Type Description
string

getDateTimePattern()

If this field is of type DATE or TIME or DATETIME, or TIMESTAMP, this method will return the date/time pattern.

Declaration
getDateTimePattern(): string;
Returns
Type Description
string

getDefaultValue()

Returns the default value for this Index Field, if specified.

Declaration
getDefaultValue(): string;
Returns
Type Description
string

getDisplayLabel()

Returns the display label for this Index Field, if specified.

Declaration
getDisplayLabel(): string;
Returns
Type Description
string

getDisplayTip()

Returns the display tip for this Index Field, if specified.

Declaration
getDisplayTip(): string;
Returns
Type Description
string

getFieldValidations()

Returns a list of all IFieldValidation validators assigned on this Field.

context
returns a java.util.List\<IFieldValidation\> instead of IFieldValidation[]
context
returns a java.util.List\<IFieldValidation\> instead of IFieldValidation[]
Declaration
getFieldValidations(): IFieldValidation[];
Returns
Type Description
IFieldValidation[]

getLength()

Returns an Index Field's maximum allowable length. This field only makes sense for String and Numeric types. For Strings, it gives the maximum length of the allowed String, for Numeric it gives the maximum number of digits, including integral and fractional parts.

Declaration
getLength(): number;
Returns
Type Description
number

getName()

Returns the name of this Index Field.

Declaration
getName(): string;
Returns
Type Description
string

getOptions()

Returns the list of predefined values specified for this Index Field.

context
returns a java.util.List\<IListItem\> instead of IListItem[]
context
returns a java.util.List\<IListItem\> instead of IListItem[]
Declaration
getOptions(): IListItem[];
Returns
Type Description
IListItem[]

getOptionsAt(index)

For the case of multi-value Index Field, returns the list of predefined values specified for the given row. 0-based index of the row the list of predefined values specified for the given row.

Declaration
getOptionsAt(index: number): IListItem[];
Parameters
Type Name Description
number index
Returns
Type Description
IListItem[]

getParsedValue()

Returns the value of this Index Field after it has been parsed internally and 'stringified' again. The returned value is in the current 'user' format: that is, in case of number, the format of the current user locale, in case of dates in the format specificed by the field type date-time pattern.

If the value cannot be parsed (e.g. it is invalid), it is returned as is (no Error is thrown).

Declaration
getParsedValue(): string;
Returns
Type Description
string

getParsedValueAt(index)

For the case of multi-value Index Fields, this function returns the value of the given row after it has been parsed internally and 'stringified' again. The returned value is in the current 'user' format: that is, in case of number, the format of the current user locale, in case of dates in the format specified by the field type date-time pattern.

If the value cannot be parsed (e.g. it is invalid), it is returned as is (no exception is thrown).

Declaration
getParsedValueAt(index: number): string;
Parameters
Type Name Description
number index
Returns
Type Description
string

getReview()

Declaration
getReview(): boolean;
Returns
Type Description
boolean

whether the review attribute is set

getReviewAt(index)

For the case of multi-value Index Field, this function returns the review flag for the given row of this Index Field.

Declaration
getReviewAt(index: number): boolean;
Parameters
Type Name Description
number index
Returns
Type Description
boolean

getReviewDetails()

Returns the review details (warn message)

The reviewDetails is a transient property: this means that it is not automatically persisted to the server. It keeps the value for as long as a IBatch is open in the client.

Declaration
getReviewDetails(): string;
Returns
Type Description
string

getReviewDetailsAt(index)

Returns the review details (warn message) at the given row of a multi-value Index Field The reviewDetails is a transient property: this means that it is not automatically persisted to the server. It keeps the value for as long as a is open in the client.

Declaration
getReviewDetailsAt(index: number): string;
Parameters
Type Name Description
number index
Returns
Type Description
string

getScale()

Returns a Numeric Index Field's maximum length of the fractional part.

Declaration
getScale(): number;
Returns
Type Description
number

getSqlType()

Returns the SQL Type (a constant from java.sql.Types). For a TIMESTAMP or a DATETIME field, this method will return java.sql.Types.DATE if there is no time pattern, else it will return a java.sql.Types.TIMESTAMP.

For other types it will return the appropriate java.sql.Type.

Declaration
getSqlType(): number;
Returns
Type Description
number

getTable()

For the case of multi-value Index Field, returns the ITable object to which the Index Field belongs. the parent ITable, if this Index Field is multi-value, or null otherwise.

Declaration
getTable(): ITable;
Returns
Type Description
ITable

getType()

Returs the name of the type of this field.

Declaration
getType(): string;
Returns
Type Description
string

getValue()

Returns the value of this Index Field in String form.

Declaration
getValue(): string;
Returns
Type Description
string

getValueAsListItem()

If this is a list field (e.g. isList() returns true), then this method will return the ListItem associated with the current value. Be careful since this method may return null if the current value is not really from the selected list (can happen if the field type list is not strict).

Declaration
getValueAsListItem(): IListItem;
Returns
Type Description
IListItem

getValueAsListItemAt(index)

For the case of a multi-value field which is a list (e.g. isList() returns true), this method returns the ListItem associated with its value at the given row. Be careful since this method may return null if the current value is not really from the selected list (can happen if the field type list is not strict).

Declaration
getValueAsListItemAt(index: number): IListItem;
Parameters
Type Name Description
number index
Returns
Type Description
IListItem

getValueAsObject()

Returns the value of this Index Field. If the value is invalid, this method will throw an Error.

Declaration
getValueAsObject(): any;
Returns
Type Description
any

getValueAsObjectAt(index)

For the case of multi-value Index Field, this function returns the value of the given row. If the value is invalid, this method will throw an exception.

Declaration
getValueAsObjectAt(index: number): any;
Parameters
Type Name Description
number index
Returns
Type Description
any

getValueAt(index)

For the case of multi-value Index Field, this function returns the value of the given row in String form.

Declaration
getValueAt(index: number): string;
Parameters
Type Name Description
number index
Returns
Type Description
string

getValueCount()

For the case of multi-value Index Field, returns the number of rows of the table to which the Index Field belongs. If the Index Field is not multi-value, it returns 1. the number of rows in the table, if this Index Field is multi-value, or 1 otherwise.

Declaration
getValueCount(): number;
Returns
Type Description
number

isHidden()

Returns whether this Index Field is hidden

Declaration
isHidden(): boolean;
Returns
Type Description
boolean

isList()

Returns whether this Index Field uses a pre-populated list of values

Declaration
isList(): boolean;
Returns
Type Description
boolean

isMultiValue()

Returns whether this Index Field is multi-value. In other, words it returns whether this Index Field belongs to a Table that can have multiple rows. if the Index Field is multi-value, otherwise

Declaration
isMultiValue(): boolean;
Returns
Type Description
boolean

isReadOnly()

Returns whether this Index Field is read-only

Declaration
isReadOnly(): boolean;
Returns
Type Description
boolean

isRequired()

Returns whether this Index Field is required

Declaration
isRequired(): boolean;
Returns
Type Description
boolean

isSticky()

Returns whether this Index Field is sticky. Sticky Index Fields have the same value for all documents in a batch.

Declaration
isSticky(): boolean;
Returns
Type Description
boolean

isValid(value)

Checks whether the given value is valid. The given value is checked against the IFieldValidation validators assigned on this Field.

Declaration
isValid(value: string): boolean;
Parameters
Type Name Description
string value

the value to check, given in user format

Returns
Type Description
boolean

setParsedValue(value)

Sets the value of this Index Field in a read-write context. By default, this method will write the value to the property with name idx.<field_name>.value. The value expected here is a stringified version, according to the field type, given in 'user' format. For example, if this is a date field with a format "M/d/y", then the value expected here should be a String in this format (e.g. 2/3/2015 for Feb 3, 2015). Before this value is saved, it will be converted in the standard format (e.g. 2015-02-03).

If parsing of the value fails, it will be stored as is.

Note: this method will throw an Error if invoked in a read-only context.

Declaration
setParsedValue(value: string): void;
Parameters
Type Name Description
string value

the new value of this Index Field

Returns
Type Description
void

setReview(value)

Sets the review attribute for this field

Declaration
setReview(value: boolean): void;
Parameters
Type Name Description
boolean value

the new value

Returns
Type Description
void

setReviewAt(index, value)

For the case of multi-value Index Field, this function sets the review flag for the given row of this Index Field.

Declaration
setReviewAt(index: number, value: boolean): any;
Parameters
Type Name Description
number index
boolean value
Returns
Type Description
any

setReviewDetails(reviewDetails)

Sets the reviewDetails property. Remember that this is a transient property only.

Declaration
setReviewDetails(reviewDetails: string): void;
Parameters
Type Name Description
string reviewDetails

the details of the review

Returns
Type Description
void

setReviewDetailsAt(index, reviewDetails)

Sets the reviewDetails property for the given row of a multi-value field. Remember that this is a transient property only.

Declaration
setReviewDetailsAt(index: number, reviewDetails: string): any;
Parameters
Type Name Description
number index
string reviewDetails
Returns
Type Description
any

setValue(value)

Sets the value of this Index Field in a read-write context. By default, this method will write the value to the property with name idx.<field_name>.value. You should make sure that the value you write is in the standard internal format. For example, if you are setting a date like Feb 3, 2015, the value should be '2015-02-03'. Do not call this method with a user-formatted value (e.g. 3/2/2015) because it will create incosistencies that are hard to identify later.

Note: this method will throw an Error if invoked in read-only context.

Declaration
setValue(value: string): void;
Parameters
Type Name Description
string value

the new value of this Index Field in standard format

Returns
Type Description
void

setValueAt(index, value)

For the case of multi-value Index Field, this function sets the value of the given row of this Index Field.

Declaration
setValueAt(index: number, value: string): any;
Parameters
Type Name Description
number index
string value
Returns
Type Description
any
Back to top Generated by DocFX