RecordFieldDefn Class Properties
In this section, the RecordFieldDefn class properties are described in alphabetical order.
Description
If the AllowSearchEventsForPromptDialogs property is set to True, it enables the SearchSave and SearchInit PeopleCode events on a prompt dialog for a field. The default value is False.
This property is read/write.
Description
This property is True if this record field is defined as an alternate search key in the associated record definition. The default value is False.
This property is read/write.
Example
&recField.AlternateSearchKey = True;
Description
This property is True if this record field is defined as a descending key in the associated record definition. The default value is False.
This property is read/write.
Example
&recField.DescendingKey = True;
Description
This property is True if this record field is defined as a duplicate key in the associated record definition. The default value is False.
This property is read/write.
Example
&recField.DuplicateOrderKey = True;
Description
This property is True if this record field is defined as a primary key of the associated record definition. The default value is False.
This property is read/write.
Example
Local RecordFieldDefn &recField = &myNewRecord.AddField("MYNEWFIELD");
If All(&recField) Then
&recField.Key = True;
End-If;
Description
This property is True if this record field is defined as a List Box item of the associated record definition.
The default value is False.
This property is read/write.
Example
&recField.ListBoxItem = True;
Description
This property returns the name of the record field definition that the field object is based on as a string value.
This property is read-only.
Description
This property returns the number of a record field definition as an integer value.
This property is read-only.
Description
Use this property to set the label text (long name or short name) for the record field when it’s displayed on a page.
This property is read/write.
Description
This property is True if this field is defined as Required in the associated record definition. The default value is False.
This property is read/write.
Example
&recField.Required = True;
Description
If this property is set to True, SearchEdit enables system edits (edits specified in the record field definition) for the field, for the life of the search dialog box. Setting SearchEdit to False disables system edits. In the Add mode search dialog box, the following edits are performed when the end-user selects the Add button. In any other mode, the following edits are performed when the end-user selects the Search button:
Formatting
Required Field
Yes/No Table
1/0 Table
Translate Table
Prompt Table
SearchEdit does not cause the FieldEdit, FieldChange, or SaveEdit PeopleCode events to fire during the search dialog.
You may use SearchEdit to control access to the system. For example, you can apply this property to the SETID field of a dialog box and require the user to enter a valid SETID before they are able to click OK on the search dialog box.
The default value is False.
This property is read/write.
Example
&recField.SearchEdit = True;
Description
This property is True if this field is defined as a search key in the associated record definition. The default value is False.
This property is read/write.
Example
&recField.SearchKey = True;
Description
Use this property to set or return the name of the existing prompt table (if any) associated with this record field definition. This property returns a string value. This property returns null if no prompt table is associated with the record field definition.
This property is read/write.
Description
Use this property to specify or return a set control field that overrides the set control field of the record definition specified in the prompt table. If you do not specify a set control field, the default is the set control field of the record definition in the prompt table.
This property is read/write.
Description
Use this property to set or return the table edit type of a record field definition. The values can be one of the following:
Numeric Value |
Constant Value |
---|---|
0 |
%EditTableType_NoEdit |
1 |
%EditTableType_Prompt |
2 |
%EditTableType_YesNo |
3 |
%EditTableType_Translate |
4 |
%EditTableType_OneZero |
The default value is %EditTableType_NoEdit.
Note: You use %EditTableType_NoEdit when there is no table edit and also when there is a table edit and its type is PromptTable with No Edit.
Example
&recField.TableEditType = %EditTableType_Prompt;
Description
This property returns the type of field. The values can be one of the following predefined values:
%FieldType_Char
%FieldType_Date
%FieldType_DateTime
%FieldType_LongChar
%FieldType_Number
%FieldType_SignedNumber
%FieldType_Time
This property is read-only.
Example
&recField.Type = %FieldType_Date;