Dear Emanuele,
attached you can find the two solutions for implementing this dynamic change attribute. Please find attached a sample implementation and example models on the 2 solutions. The libraries are also available in the SVN.
1) EXPRESSION Attribute:This implementation uses an expression attribute to retrieve the value of another attribute and also adapt the graphical representation accordingly. Please notice that you can write expressions in the Development Toolkit environment as well as in the Notebook of the object in the Modelling Toolkit environment, depending on the planned behaviour.
ABL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueExpression_ADOxx1.3UL1/BIN/ExpressionAttributeLibrary.ablADL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueExpression_ADOxx1.3UL1/DOC/ExpressionAttrModel.adl2) EVENT Handler:You can also implement the behaviour as an event handler. For this purpose you can use the Event "AfterEditAttributeValue" and combine it with a "IF" condition.
ABL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueEvent_ADOxx13UL1/BIN/ChangeAttributeValueEventLibrary.ablADL:
https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ChangeAttributeValueEvent_ADOxx13UL1/DOC/ChangeAttributeValueEventModel.adl