Skip to main content
Version: 18

Range of Values

Default value

You can assign a default value to be entered in an input object. This property is useful for example when the input data source is a field: the default value is entered when a new record is first displayed. You can change the value unless the input area has been defined as non-enterable.

The default value can only be used if the data source type is:

  • text/string
  • number/integer
  • date
  • time
  • boolean

4D provides stamps for generating default values for the date, time, and sequence number. The date and time are taken from the system date and time. 4D automatically generates any sequence numbers needed. The table below shows the stamp to use to generate default values automatically:

StampMeaning
#DCurrent date
#HCurrent time
#NSequence number

You can use a sequence number to create a unique number for each record in the table for the current data file. A sequence number is a longint that is generated for each new record. The numbers start at one (1) and increase incrementally by one (1). A sequence number is never repeated even if the record it is assigned to is deleted from the table. Each table has its own internal counter of sequence numbers. For more information, refer to the Autoincrement paragraph.

Do not make confusion between this property and the "default values" property that allows to fill a list box column with static values.

JSON Grammar

NameData TypePossible Values
defaultValuestring, number, date, time, booleanAny value and/or a stamp: "#D", "#H", "#N"

Objects Supported

Input


Excluded List

Allows setting a list whose values cannot be entered in the object. If an excluded value is entered, it is not accepted and an error message is displayed.

If a specified list is hierarchical, only the items of the first level are taken into account.

JSON Grammar

NameData TypePossible Values
excludedListlistA list of values to be excluded.

Objects Supported

Combo Box - List Box Column - Input


Required List

Restricts the valid entries to the items on the list. For example, you may want to use a required list for job titles so that valid entries are limited to titles that have been approved by management.

Making a list required does not automatically display the list when the field is selected. If you want to display the required list, assign the same list to the Choice List property. However, unlike the Choice List property, when a required list is defined, keyboard entry is no longer possible, only the selection of a list value using the pop-up menu is allowed. If different lists are defined using the Choice List and Required List properties, the Required List property has priority.

If a specified list is hierarchical, only the items of the first level are taken into account.

JSON Grammar

NameData TypePossible Values
requiredListlistA list of mandatory values.

Objects Supported

Combo Box - List Box Column - Input