User-Defined Fields

Overview

  • User-defined fields let organisations capture more information if the standard fields are insufficient. User-defined fields can be added to the following modules from the user-defined fields interface.
    • Customers
    • Customer Contacts
    • Suppliers
    • Supplier Contacts
    • Staff
    • My Organisation
  • Several read-only user-defined field types are provided to display information that is not meant to be updated by users. These fields must be updated by custom triggers or procedures in the database.
  • Once a user-defined field is added, a tab named User Fields is created, and the user-defined fields are listed there.
Navigation Example

Main Menu > Setup > User-defined Fields

Settings

Navigation Example

Main Menu > Setup > Settings > General (tab)

Setting Description Default
General > Folder - Documents - e.g. C:\Temp\Docs
  • The folder that files selected in Filename fields are copied to. The folder is created if it does not exist.
  • Workflows also copy files to this folder.
Blank

Buttons Explained

Button Description
NewCreates a field.
DeleteDeletes the selected field.
SaveSaves any changes.
PreviewOpens the fields on a blank page for viewing.
Menu > Create Selectable Stored ProcedureLets you create a stored procedure to autofill the user field.

Filters Explained

Filter Description
ModuleA dropdown list of the available modules to select one (to the left of the New button).

Fields Explained

Info

Fields marked in blue (✎) can be edited.

Field Description
IDThe system-generated number for the entry.
NameThe system name for the user field.
CaptionThe caption for the field which can be entered.
EditorA dropdown list of options that specifies how users complete the field.
LayoutSpecifies where the user-defined field is placed. The options are:
  • Below: The field appears below the caption.
  • Column: The field starts a new column.
  • Right: The field appears to the right of the caption.
CaptionSpecifies where the caption appears. The options are:
  • Hide
  • Left
  • Right
  • Top
WidthSpecify the fields width.
DecimalSpecify the number of decimal places if the input requires a number.
OrderEnter a number to change the order in which the fields appear.
Menu (...)A context menu that changes depending on the field clicked. Typical options are:
  • Insert
  • Edit Lookup List
  • Edit SQL
  • Move Up
  • Move Down
  • Delete

Editor Types

Field Description
CheckboxCreates a checkbox. Returns 1=Checked; 0=Unchecked
ComboBox (Fixed list)Requires a lookup list (right-click the entry and select Edit Lookup List). You must select an option from the lookup list.
ComboBox (Editable)Requires a lookup list (right-click the entry and select Edit Lookup List). You can select an entry from the lookup list or enter the text.
CustomerCreates a lookup list of customers.
DateCreates a calendar to select a date.
Date (Read-only)Displays a date that cannot be edited. Click Menu (button) > Create Selectable Stored Procedure to determine the date.
FilenameOption to select a file. The file is copied to a designated folder, and the name of the file is stored in the field.
Group HeaderThe caption appears in bold as a group header.
Image
  • Stores an image in the database.
  • You can upload or paste images into the control.
  • Multiple image formats are supported.
ItemProvides a dropdown list of items for selection.
Lookup (SQL)Uses SQL to lookup ID-Value pairs. See the notes below for more information.
MemoType a memo.
NumberEnter a number.
Number (Read-only)Displays a number that cannot be edited. Click Menu (button) > Create Selectable Stored Procedure to determine the number.
SupplierDisplays a lookup list of suppliers.
TextDisplays a field for text input.
Text (Read-only)Displays text that cannot be edited. Click Menu (button) > Create Selectable Stored Procedure to determine the text.
TimeProvides a time chooser to select a time.
TimestampProvides both a calendar and time chooser.
CaptionDisplays the caption.
Lookup (SQL)Completes the field by running an SQL query.

Notes

Lookup (SQL)

This type creates a lookup ComboBox using the SQL entered in the SQL Editor. (Right-click the field and select Edit SQL.) The SQL must return an ID (Integer) field and a DESCRIPTION (Text) field.

The Lookup (SQL) field type can contain parameters in the SQL that are populated from same-name user-fields linked to the same record. For example, if the parameter name is :CUSTOMER, it is assigned the value from the user-defined field named CUSTOMER. When a transaction is saved, the Lookup (SQL) field values are validated and cleared if they are no longer valid.

Selectable Stored Procedure

A selectable Stored Procedure can be created using Menu > Create selectable Stored Procedure. For this reason, the Name field on User-defined fields may not use Firebird reserved names such as DATE and TIMESTAMP.

The following parameter types are included in the Selectable Procedure:

  • Group Header
  • Repeat Header
  • Input – Text 
  • Input – Number
  • Input – Select Number
  • Input – Number/Text (the ID and the Text are returned in separate fields – NAME_ID / NAME_TEXT)
  • Input – Memo
  • Lookup

Sample SELECT SQL from Classes Stored Procedure .

select
M.MATUNITID,
M.DESCRIPTION,
U.MAKE,
U.MODEL,
U.REGNO
from MATUNIT M
join UDF_3011_VEHICLES (M.MATUNITID) U on true

Report an issue with this page

For more useful feedback, select the text on the page you're reporting about, then click Feedback again — or continue without selecting anything.