Number fields
A Number field contains a number. A Number field uses all the usual field properties, which are described in Field properties. There are some additional properties.
The Default Value property is used to specify an initial value for the field. If blank, the user will be required to input a value.
The UOM List property indicates what sort of measurement the number in the field is for; e.g., area, length, quantity. It is possible for you to customize the list of unit of measure types. This is described in Units of measure.
The Create Base Field property is visible only if the value of the UOM List property is Currency. If the check box in the Create Base Field property is checked, then when the properties for this field are saved, a base currency field will be created for this field. Base currency fields are discussed in Base currency fields.
The name of the base currency field will be the name of this field followed by Base. For example if the name of a field is CanadianCost, then the name of its base field would be CanadianCostBase.
The Default UOM property specifies the default unit of measure to be associated with values in this field. The values in the drop-down list are the UOM Values for the UOM Type selected in the UOM List property.
- Accept Decimal
- This means numbers that do or do not contain a decimal point will be valid.
- Accept Only Number
- This means that only numbers that do not contain a decimal point will be valid.
When the UOM List property is blank, the Display Mask, Storage Precision, and Rounding Rule properties are visible.
Display Mask controls the formatting of the display of values for this number field. The values to put in the Display Mask property are described in "Number formats". The formatting in a Number field takes precedence over UOM formatting when displaying Number fields in query reports or forms.
Storage Precision defines how many decimal places the platform is to use when computing and storing numbers entered in this number field. Enter the number of digits to the right of the decimal point. The maximum value is 12.
- Ceiling
- Round the fractional digit so the value moves toward positive infinity. For example, if Storage Precision is 2, 1.234 => 1.24, 1.12 => 1.13, -1.234 => -1.23.
- Down
- Round the fractional digit so the value moves toward zero. The operation effectively truncates the value at the number of decimal places in Storage Precision. For example, if Storage Precision is 2, 1.2345 => 1.23, 1.328 => 1.32, -2.125 => -2.12.
- Floor
- Round the fractional digit so the value moves toward negative infinity. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.23, 1.235 => 1.23, -1.234 => -1.24.
- Half Down
- Round the fractional digit using the digit to the right to determine the direction of the round. If the digit to the right is 6 or greater, round up. If the digit to the right is 5 or less, round down. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.23, 1.23 => 1.23.
- Half Even
- Round the fractional digit up or down as needed to make it even. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.24, 1.245 => 1.24, 1.23 => 1.23.
- Half Up
- Round the fractional digit using the digit to the right to determine the direction of the round. If the digit to the right is 5 or greater, round up. If the digit to the right is 4 or less, round down. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.24, 1.23 => 1.23.
- Up
- Round the fractional digit so the value moves away from zero. For example, if Storage Precision is 2, 1.234 => 1.24, 1.23 => 1.23, -1.234 => -1.24.
When the UOM List property is defined, the Use Custom Precision and Mask property is visible. This property specifies whether or not this number field will use the properties for Display Mask, Storage Precision, and Rounding Rule as they are defined on the UOM.
When Use Custom Precision and Mask is not checked, the platform uses the Display Mask, Storage Precision, and Rounding Rule as they are defined on the UOM.
When the Use Custom Precision and Mask property is checked, the Display Mask, Storage Precision, and Rounding Rule properties are visible and initially set to the values defined on the UOM. Any change you make only applies to this number field.
The UOM Source Attribute property contains a drop-down list that allows you to specify the name of a field in the business object. If the Formula check box is not checked, the drop-down list will contain names of UOM fields only. The unit of measure for this field will be determined by the value of the named UOM field.
If the Formula check box is checked, the drop-down list will contain names of UOM and Number fields. The unit of measure associated with the named field is the unit of measure of the formula's result.
The value of the UOM Source Attribute property is the name of another Number field in this business object. If the UOM Source Attribute property has no value, then the unit of measure for the field is defaulted to the value specified in the Default UOM property and may be overridden by the user at runtime.
If you specify a value for the UOM Source Attribute property, the named field's unit of measure becomes the unit of measure for this field. Also, this field's Default UOM property is grayed out and set to the value of the other field's Default UOM property.
If you specify a value for the UOM Source Attribute property, the UOM List property and the Default UOM property are grayed out and their values ignored.
When there is a value in the Threshold Source Attribute property, this number field is a scored number field, meaning it will be scored (as described with the Comparison property in "Smart sections"). The score is displayed as a red, yellow, or green image.
The value of the Threshold Source Attribute property must be a locator field that references the Threshold business object. This locator field must be in either a General section or a single-record smart section. For a number field that is in a smart section, the linked locator field must reside on the referenced business object. The threshold record defines the threshold ranges and contains a UOM value that is used to convert the scored value.
Select the linked locator field in the Threshold Source Attribute drop-down list. The list only shows locator fields in the same business object that references the Threshold business object.
A scored number field can be used in a form section, non-table smart section, table smart section, or vertical table section.
The score for the field is calculated during the rendering of the field and is not stored. The platform compares the UOM of the number field with that of the threshold record. If a conversion is needed, the platform converts the number value before comparing it with the threshold value to calculate the score.
During runtime, the system uses the threshold record that is currently selected by the linked locator fields. If the locator field does not have a value, the number field displays without a score.
The score is updated when the tab is reloaded. This means that if the value of the number field, or the threshold record, or the locator field that links to the threshold record, is changed, the score will not update (if needed) until the tab is reloaded.
If the check box in the Formula property is checked, it means that the value of the field will be determined by a formula and will be read only. This property is discussed in Formulas.
The Sum this Field check box is grayed out unless the field is part of a smart section. If this check box is checked, it causes a summary field to be generated in the business object that contains the smart section. There is more detail about sums in "Record organization".