Home Reference Source
import FieldSelectorMulti from './gui/data-items/FieldSelectorMulti.jsx'
public class | source

FieldSelectorMulti

Extends:

gui/data-items/FieldSelectorBase.js~FieldSelectorBase → FieldSelectorMulti

The purpose of FieldSelectorMulti is to provide a list of possible fields from upstream connected tools, as well as store multiple of them as a list of choices in your tool's XML configuration. It will write to your tool's XML configuration the text of the name of the chosen fields with a delimiter between them. It will also allow you to add choices as fields which will show up on all "FieldSelectors" which are looking at the same upstream connection. It does have facilities for choosing connection by anchor index, and connection index.

Static Member Summary

Static Public Members
public static

doesFieldExist(fieldName: string): boolean: *

Function that returns true if the field exists in the selected field list.

public static

Function that adds a field into a the forced field list for the data item.

public static

Function that returns the current delimiter used in persistence of the data items values to the tool's XML configuration.

public static

getFieldStatus(fi: Field): string: *

Function that returns the field status for the specified field.

public static

getFields: array: *

Function that returns the current filtered fields for the data item.

public static

getOptionList: array: *

Function that returns the current option list for the data item.

public static

isForcedField(fieldName: string): boolean: *

Function that returns true if the specified field is a forced field.

public static

Function that clears the forced field list for the data item.

public static

setCustomFieldFilter(newFieldFilter: function): *

Function that changes the field filter to a custom function for the data item.

public static

setDelimiter(delimiter: string): *

Function that changes the current delimiter used in persistence of the data items values to the tool's XML configuration.

public static

setFieldFilter(filterName: string): *

Function that changes the allowed field types for the data item by specifying a filter.

Constructor Summary

Public Constructor
public

constructor(dataName: string, dataItemProps: object)

Constructor

Static Public Members

public static doesFieldExist(fieldName: string): boolean: * source

Function that returns true if the field exists in the selected field list.

Return:

boolean

If the field exists in the chosen upstream connection.

public static forceFieldInFieldList(field: object): * source

Function that adds a field into a the forced field list for the data item.

public static getDelimiter: string: * source

Function that returns the current delimiter used in persistence of the data items values to the tool's XML configuration.

Return:

string

The current delimiter.

public static getFieldStatus(fi: Field): string: * source

Function that returns the field status for the specified field.

Return:

string

The field status: " (Missing)", " (BadType)" or empty string.

public static getFields: array: * source

Function that returns the current filtered fields for the data item.

Return:

array

The current filtered fields.

public static getOptionList: array: * source

Function that returns the current option list for the data item.

Return:

array

The current option list.

public static isForcedField(fieldName: string): boolean: * source

Function that returns true if the specified field is a forced field.

Return:

boolean

If the field is a forced field.

public static removeForcedFields: * source

Function that clears the forced field list for the data item.

public static setCustomFieldFilter(newFieldFilter: function): * source

Function that changes the field filter to a custom function for the data item.

public static setDelimiter(delimiter: string): * source

Function that changes the current delimiter used in persistence of the data items values to the tool's XML configuration.

public static setFieldFilter(filterName: string): * source

Function that changes the allowed field types for the data item by specifying a filter. Possible Filters: All, NoBinary, NoBlob, NoSpatial, String, Date, DateOrTime, StringOrDate, NumericOrString, Numeric, SpatialObj, Bool, Time, and Blob

Public Constructors

public constructor(dataName: string, dataItemProps: object) source

Constructor

Params:

NameTypeAttributeDescription
dataName string

The name of the data item.

dataItemProps object

An object of properties such as hidden, disabled, suppressed etc.

dataItemProps.manager Manager

The data manager.

dataItemProps.anchorIndex number
  • optional
  • default: 0

The index of the anchor from which to choose the upstream connection.

dataItemProps.connectionIndex number
  • optional
  • default: 0

The index of the connection from which to choose fields.

dataItemProps.fieldType string
  • optional
  • default: 'All'

Allows only this type of field.

dataItemProps.delimiter string
  • optional
  • default: ','

The delimiter used to separate the values.