PropertyValue
Synopsis
struct PropertyValue {
string value;
string text;
URL smallIcon;
URL largeIcon;
Money? Surcharge;
string? Image;
boolean? Selectable;
}
Instances of the PropertyValue structure are returned by the Online Configurator to completely describe a property value. The structure has the following fields:
value
This is the internal property value.
For properties of type Character this field contains either an internal symbolic character sequence or human readable text1.
For properties of type Numeric and Length this field contains the numeric value of the property formatted as follows: The integral part of the value is formatted as an optional minus sign followed by one or more decimal digits without any insignificant leading zeros. If the property is declared with a non-zero number of decimal digits (digits right of the decimal point), the formatted integral part is followed by a decimal point (.) and the number of declared decimal digits. XXX
text
This is the human readable property value.
For properties of type Character this is either the same as value, or, if value is a symbolic character sequence, a human readable text representing the symbolic value. The language used for the human readable text depends on the configuration of the current session and the languages supported by the product data.
For properties of type Numeric and Length this is the numeric value of the property formatted according to the rules of the locale configured for the current session.
smallIcon
If the property has a choice list, and a small icon is available for this property value, then this field contains an URL referencing the image for the small icon. Otherwise it contains an empty string.
image
The field, if present, contains the URL of a large material image (stored in directory …/mat/l).
largeIcon
If the property has a choice list, and a large icon is available for this property value, then this field contains an URL referencing the image for the large icon. Otherwise it contains an empty string.
Surcharge
This field is used by operations getChoiceList and getAllChoiceLists to return the property value’s surcharge if
-
return of price information is enabled
-
OFML actually reports a surcharge for the property value
-
The effective value of option discardSurcharge is false.
If present, the surcharge will always be a finite monetary quantity, i.e. have a finite, possibly zero, value and a valid currency.
selectable
Depending on whether an instance of PropertyValue represents an actual (current) property value or a choice list value, field selectable is missing (property value) or present (choice list value). In the latter case, a value of false indicates that the choice list value should be displayed, but must not be available for selection as the new property value.
If the value of a property is undefined then the value field of the PropertyValue structure has one of the following special values:
@UNDEFINED
the property is neither visible, nor of type Character, nor does it have a choice list
@VOID
used if the property is an optional property
@UNSPECIFIED
used if the property is an restrictable, but not an optional property
@NOVALUE
used if the property is neither an optional nor a restrictable property
The content of the text field of undefined property values is undefined and may change in further versions of the Online Configurator. The smallIcon and largeIcon fields of undefined property values contain an empty string.
Footnotes
-
Symbolic character sequences are usually used with visible properties that have choice lists and do not allow additional values. ↩