8.3.8   FieldOperation

The FieldOperation modifier makes it possible to perform an operation on a field taking an SDF or a TDF as the Field to affect.

Figure 178   FieldOperation Modifier

The Operand may be an indexed field from a value list. In this case, it will be possible to set an Operand field index. It is then possible to choose either a defined field or to enter a value for the index, see Figure 179.

Figure 179   FieldOperation with a Field from a Value List.

If no SDFs or TDFs have been defined, no fields are found and the FieldOperation modifier showsNo available fields found.

There are different operations available depending on the data type of the chosen field. Table 84 explains the available operations.

Table 84    Available Field Operations

Data type

Operations

Numeric

Set – sets the chosen field with a numeric value.


Add – adds a numeric value to the chosen field.


Subtract – subtracts a numeric value from the chosen field.


Multiply – multiplies the chosen field with a numeric value.


Divide – divides the chosen field with a numeric value.


Note: If the calculation of the operation is less than the minimum of the field or greater than maximum of the field the resulting value will be wrapped around. For example, if a field has the minimum value of 1 and maximum value of 10 and the operation is 5 ADD 6 the result will be 1. This is the default behavior in ERE but in different integrated solutions this behavior may differ.

String

Set – sets the chosen field with a String.


Append – adds a String to the end of the chosen fields string value.


Prepend – adds a String to the beginning of to the chosen fields string value.

Boolean

Set – sets the chosen field with a Boolean value.

Date

Set – sets the chosen field with a Date value.


Add – adds a value to the chosen field. Available units are: Year, month and day.


Subtract – subtracts a value from the chosen field. Available units are the same as for Add.

Time

Set - Sets the chosen field with a Time value.


Add - Adds a value to the chosen field. Available units are: Year, month, day, hour, minute and second.


Subtract - Subtracts a value from the chosen field. Available units are the same as for Add.

Amount

Set - Sets the chosen field with a value.


Add - Adds a value to the chosen field.


Subtract - Subtracts a value from the chosen field.

Note:  
Operations do not exist for all data types. Field operation does not support all data types in ERE.

If Use field is not selected it is possible to define a fixed value as an operand for the operation, see Figure 178.

If Use field is selected it is possible to chose any field of a comparable type as operand for the operation, see Figure 180.

Figure 180   FieldOperation - Use Field

The field operation modifier may be used to modify the variables Beginning of Time and End of Time, see Section 5.3.12.