Changing the Value of a Property From Another Property
This document provides information on how to change the value of a property (field) when the value of another property is updated.
The process described below demonstrates how to add a simple script to a data class to update the value of property MYPROP2 when the value of property MYPROP1 changes.
# Properties for MYCLASS$PROPERTIESCase CURPROWhen "MYPROP1" : Gosub MYPROP1EndcaseReturn# Action to be carried out when MYPROP1 is updated = automatically set MYPROP2 to active NO$MYPROP1Case ACTION# Set MYPROP2 to active NOWhen "PROPAGATE"this.MYPROP2 = CST_ANOEndcaseReturnNote: In this example, the value for property MYPROP2 is set to "NO" when MYPROP1 is changed. However, the principle and format can be used for any property (field) type.