✏️ Explanatory Question
The modified() method is a standard method on the field of the form data source. This method is called when the value of a specific field is modified.
Example
You have a custom form with a table named TrainingMaster. The table has a field named Venue and an enum type field named TrainingType that has two values: Online and Classroom. If Online is selected for the TrainingType, the Venue field should become blank.
The coding pattern can be as follows:
[DataSource]
class TrainingMaster
{
[DataField]
class TrainingType
{
public void modified()
{
super();
if(TrainingMaster.TrainingType == TrainingType::Online)
TrainingMaster.Venue = "";
}
}
}