Class ExtraFieldsInfo

With this class, you can retrieve meta-information about an extra field.

The class will only retrieve information, thus it is not possible to change an extra field from this class.

Examples

ExtraFieldsInfo e;

e.getExtraFields("person"); // Finds extraFields in table person

Constructors

ExtraFieldsInfo()

Initializes a new instance of the ExtraFieldsInfo class.

Declaration

ExtraFieldsInfo

Examples

ExtraFieldsInfo e;

e.getExtraFields("person"); // Finds extraFields in table person

Methods

eof()

Checks if there are no more fields in the result.

Declaration

Bool eof()

Examples

ExtraFieldsInfo efi;

for (efi.getTicketChildrenFields(); !efi.eof(); efi.next())
{
  // do something with information from efi
}

Returns

Type Description

getChildrenFields(Integer,Integer)

Loads extra fields of the type given in the first parameter. If the type is an extra table relation, the second pointer is the ID of the extra table it points to.

Declaration

Void getChildrenFields(Integer type, Integer extraTableTarget)

Examples

If you want all extra fields pointing to the extra table with ID 5, you'd call getChildrenFields(20, 5)

If you want all extra fields of type Dat you'd call getChildrenFields(3, 0)

Parameters

Type Name Description
Integer type
Integer extraTableTarget

Returns

Type Description
Void

getCompanyChildrenFields()

This is a helper function for getting company relation fields. It is equivalent to calling getChildrenFields(17, 0).

Declaration

getCompanyChildrenFields()

Returns

Type Description
Void

getCustomerChildrenFields()

This is a helper function for getting customer relation fields. It is equivalent to calling getChildrenFields(16, 0).

Declaration

Void getCustomerChildrenFields()

Returns

Type Description
Void

getDisplayField()

Returns the display field of the current field.

Declaration

String getDisplayField()

Examples

ExtraFieldsInfo e;

e.getExtraFields("person");
print(e.getDisplayField());

Returns

Type Description
String

getExtraFields(String)

Gets extra fields related to the given table. Using this method will make it possible to access the information in the extra fields by using the other functions in the class.

Declaration

Void getExtraFields(String table)

Examples

ExtraFieldsInfo e;

e.getExtraFields("person");

Parameters

Type Name Description
String table

Returns

Type Description
Void

getFieldName()

Returns the field name of the current field.

Declaration

String getFieldName()

Examples

This code prints all field names of extra fields:

ExtraFieldsInfo e;

e.getExtraFields("person");

while(!e.eof()){
  print(e.getFieldName());
  e.next();
}

Returns

Type Description
String The field name of the current field.

getFlags()

Returns the flags for the current extra field.

The flags can be accessed by wrapping the returned Integer in a FHBitSet.

Declaration

Integer getFlags()

Examples

FHBitSet flags;

flags.set(extraField.getFlags());

flags.getBitNo(17);  // returns true if the extra field cannot be empty

Returns

Type Description
Integer

getName()

Returns the descriptive name (not the database name) of the current field.

Declaration

String getName()

Examples

This code prints all names of extra fields:

ExtraFieldsInfo e;

e.getExtraFields("person");

while(!e.eof()) {
  print(e.getName());
  e.next();
}

Returns

Type Description
String

getParam(String,String)

This function returns the value of the given parameter.

Declaration

String getParam(String parameter)

Parameters

Type Name Description
String parameter The info to get, see list of values.

Returns

Type Description
String

getTableName()

Returns the name of the table the current field belongs to.

Declaration

String getTableName()

Examples

ExtraFieldsInfo e;

e.getExtraFields("person");
print(e.TableName());

Will print "person".

Returns

Type Description
String The table the current field belongs to.

getTicketChildrenFields()

This is a helper function for getting ticket relation fields. It is equivalent to calling getChildrenFields(18, 0).

Declaration

Void getTicketChildrenFields()

Returns

Type Description
Void

next()

This function moves to the next field in the result.

Declaration

Void next()

Examples

ExtraFieldsInfo efi;

for (efi.getTicketChildrenFields(); !efi.eof(); efi.next())
{
  // do something with information from efi
}

Returns

Type Description
Void