Description
Increment Attribute increments an attribute by a value.
Parameters
This function block has the following parameters:
Parameter |
Description |
Region ID |
ID of Region where item is located. |
Location |
Location of the item in the Region. |
Item Class |
Class of the item. |
Attribute ID |
ID of Attribute whose value is to be set into the RCO Variable. |
Quantity |
Amount to increment the attribute. |
Pseudo Code
Get item
If item found
Get attribute value
If attribute is found
Convert the attribute value to numeric
Add quantity to numeric attribute value
Write attribute value back to item
End if
End if
Note: The attribute value is converted to numeric using the rules of the Basic "Val" function.
The value of the attribute is overwritten with the new value. If the attribute couldn't be converted to a numeric value, then the attribute will be updated with the Quantity value.
Val Function (Basic Control Engine)