This content has been marked as final. Show 7 replies
I think if you add this attribute to the CI Type Configuration Item, then it will be a parent to all configuration items, including those under asset.
I need it on type rather than item though. It's the depreciation value (in years) for the particular asset type.
1 of 1 people found this helpful
I see - well it should be possible, although in the past I've needed to add an extra key to the console.exe.config before using object designer to be able to do that for certain classes. It might be worth getting that key from support in case my inforamtion is too out of date.
Will do Dave, cheers.
Graham - did you get anywhere with this? I'd like to add things like stock levels to the CI type. If you been there, done that etc maybe you could say how you chose to do it in the end?
I got sent a key that let me view the classes but I was still unable to add any attributes.
I ended up using the desciption field to store the values I need for my calculations.
Calculation for depreciated values is:
static def GetAttributeValue(ConfigItem):
//Sets the depreciated value of assets
//Perth & Kinross Council
age = 0
value = 0.00
multiplier = 0.00
age = DateTime.Now.Year - ConfigItem._DeliveryDate.Year
age-- if DateTime.Now.Month < ConfigItem._DeliveryDate.Month or (DateTime.Now.Month == ConfigItem._DeliveryDate.Month and DateTime.Now.Day < ConfigItem._DeliveryDate.Day)
//The multiplier is stored in the class type description attribute for each Config item Type
if ConfigItem.Class.Description != null:
multiplier = double.Parse(ConfigItem.Class.Description)
multiplier = 1 - ( (1/multiplier ) * age )
value = ConfigItem._Purchasecost * multiplier if multiplier >0
Thanks Graham. Another useful calculation to add to the library :-)