Field-level rules define how a field will behave under certain circumstances. The field-level rules for a given field are stored within the family rule project for the family to which the field belongs.
Each family rule project contains a code item for each field that exists within the family. The rules for a given field are stored in the file that corresponds to that field.
The following types of rules can be defined for each family field.
Rule Type | Description | Associated Function |
---|---|---|
Required | Determines whether or not a value must be entered into a field before a record can be saved in the family. | IsRequired |
Validation | Lets you define criteria that will be used to validate values that are entered into a field. | Validate |
Valid Values | Lets you define a list of values that will be available for selection in the field. You will be able to select any value from those defined in the list of Valid Values. | GetPickList |
Default Value | Defines the default value that will be provided for a field. When you create a new record, the default value will be provided automatically. You can accept the default value or specify a different value. | GetDefaultInitialValue |
Disabled | Determines when, if ever, the field will be disabled, or locked from modification. | IsDisabled |
Format | Determines the formatting that will be applied to values entered into a field. | FormatValue |
Formula | Calculates the value in the field using a formula that has been specified through rules. | GetCalculatedValue |
You can develop custom field-level rules manually by accessing the code item for the appropriate field and inserting the custom code. The code for each rule type must be defined within the appropriate function, which serves as a container for the code for that rule.
Copyright © 2018 General Electric Company. All rights reserved.