Defining custom fields

This page describes how to define custom fields in Director for users, clients, and accounts.

To define a custom field, create a record in the CUSTOMFIELDS table.

Director’s CUSTOMFIELDS table

Director’s CUSTOMFIELDS table stores definitions of custom fields.

CUSTOMFIELDS table
Column Type Description

FIELDNAME

CHAR

The name of the field

FIELDDEFAULT

CHAR

The default value of the field

FIELDDOMAIN

CHAR

One of three values:

  • 'client'

  • 'user'

  • 'account'

RANKING

INT

Determines the display position of the field on the form relative to other fields. Fields with a lower RANKING value are displayed before fields with a higher RANKING value.

DISPLAYTYPE

CHAR

If FIELDDOMAIN is 'account', then the only valid value of this field is 'account-text'.

If FIELDDOMAIN is 'user' or 'client', then this field can have one of three values:

  • 'select'

  • 'checkbox'

  • 'text'

DISPLAYNAME

CHAR

The display label for the field.

EDITMODE

CHAR

One of two values:

  • 'read'

  • 'write'

  • 'write-once'

OPTIONAL

CHAR

Specifies whether the user must enter a value for the field.

One of two values:

  • 'Y'

  • 'N'

Example custom field definition

For example, to define a mandatory account field called 'LegalEntity', execute the SQL below:

INSERT INTO DIRECTOR.CUSTOMFIELDS
  (FIELDNAME,FIELDDEFAULT,FIELDDOMAIN,
   RANKING,DISPLAYTYPE,DISPLAYNAME,
   EDITMODE,OPTIONAL)
VALUES
  ('LegalEntity','','account',
   0,'account-text','Legal Entity',
   'write', 'Y');