Set Values
This command is used to update the values of the specified attributes, for all resources in the specified class, with the specified value. An attribute can be a system attribute (name, description, unit, effective from, effective to, distribution), a user attribute, a property, or a default property.
- If attribute is a property, only the property values within the planning horizon are updated.
- If the value is not a known attribute or property of class, the value is considered as a constant.
Multiple actions can be performed by specifying multiple sets of attribute and values. An explicit date format can be specified by using the date value with a format specifier as a prefix which indicates the sequence of (d)ay, (m)onth and (y)ear. For example:
- dmy: 31-12-2019 is ‘31st Dec 2019’
- ymd: 19-01-02 is ‘2nd Jan 2019’
- mdy: 3-1-19 is ‘1st Mar 2019’
Syntax
Set Values: <class>.<attribute> = <value>[, <class2>.<Attribute2> = <value2>][... , <classN>.<AttributeN> = <valueN>];
Argument | Description |
---|---|
class | The name of class to set values. |
attribute | The name of the attribute on class to set values. This can be a user attribute, property, default property (*), or a system attribute. |
Value | The value to set for class.attribute. The value can be an attribute name. |
classN | The name of class to set values. |
attributeN | The name of attribute on classN to set values. This can be a user-defined attribute, property, default property (*), or a system class attribute. |
valueN | The Value to set for classN._attributeN. The value can be an attribute name. |
Log message
Attribute name | Message |
---|---|
Attribute |
APACS193=Updated {2} values to {1} for attribute "{0}". Where,
|
Default property |
APACS113=Updated {2} values to {1} for default property "{0}". Where,
|
Property |
APACS111=Updated {2} values to {1} for property "{0}" Where,
|
Condition | Message |
---|---|
If the class is not a valid class name in the model. | This error is reported, and values are not
updated:APACS110=There is no class with name "{0}" defined in the model. {0} = class name which invalid |
If the attribute is not a known attribute or property for the specified class. | This error is reported, and values are not
updated:APACS197=Unknown attribute "{0}" for class "{1}".
|
If the attribute is a property name which is calculated. | This error is reported, and values are not
updated:APACS207=Cannot update calculated property "{0}". {0} = Class.property which cannot be updated. |
When updating a numeric attribute (for example, distribution), a default property, or a property, and value is a constant which cannot be converted to a number (for example, ‘12.4.2’). | This error is reported, and values are not
updated:APACS118=Invalid number "{0}". {0} = The value which failed to be converted to a number. |
When updating a date attribute (for example, effective from, effective to, effective at), and value is a constant which cannot be converted to a date (for example, “32-24-2011”). | This error is reported, and values are not
updated:APACS204=Invalid date "{0}". {0} = The value which failed to be converted to a date. |
When updating a numeric attribute, a default property, or a property where value is another attribute, any values for the value attribute which cannot be converted to a number. |
APACS206=Error while updating "{0}" to "{1}" for resource "{2}"
This Indicates the faulty resource and value, and those values are set to 0. Note:
|
When updating a date attribute where value is another attribute, any values for the value attribute which cannot be converted to a date. |
APACS206=Error while updating "{0}" to "{1}" for resource "{2}".
This indicates the faulty resource and value, and those values are updated to an empty date. Note:
|
Requirement | Syntax |
---|---|
Set the values of “property” property, for all resources of “Class” class, across the planning horizon. |
Set Values: Class.property = 0; |
Clear all values of property “property”, for all resources of class “Class”, across the planning horizon. |
Set Values: Class.property = nil; |
Set the values of “property” property to the value of property “another property”, across the planning horizon. |
Set Values: Class.property = another property; |
Set the values of default property "property (*)" to the value 100, for all resources of “Class” class. |
Set Values: Class.property (*) = 100; |
Clear the values of default property "property (*)“, for all resources of”Class" class, effectively resetting the default property values for updated resources to the default value specified in the class definition. |
Set Values: Class.property (*) = nil; |
Set the values of “unit” attribute to the value “pieces” for all resources of “Class” class. |
Set Values: Class.unit = pieces; |
Set the values of user attribute “user defined attribute” to the value of attribute “name” for all resources of “Class” class. |
Set Values: Class.user defined attribute = name; |
Set the values of ‘effective from' date attribute to the 23 of January 2019, for all resources of “Class” class. |
Set Values: Class.effective from = 23-01-2019; |
Set the values of ‘effective from' date attribute to the 23 of January 2019, for all resources of “Class” class, for a specified date format. |
Set Values: Class.effective from = (ymd) 2019-01-23; |
Set the values of unit attribute to “pieces”, default property property
(*) to 100, and property property to nil, for all
resources of “Class” class |
Set Values: Class.unit = pieces, Class.property (*) = 100, Class.property = nil; |