6. Working with Arrays, Table Fields, and Collections : Table Field Operations : Column Operations : How You Can Use the HasDataChanged Attribute
 
Share this page                  
How You Can Use the HasDataChanged Attribute
If cell attributes are turned on for a given column field, you can fetch the CellAttribute object for a cell by using the column field CellAttribute method. The following example shows the syntax for fetching the CellAttribute object that corresponds to the cell in a column field:
cellattribute = columnfield.CellAttribute(record = integer)
integer
Specifies the row index of the cell
Having fetched the CellAttribute for a cell, you can use its HasDataChanged attribute to see whether the user has made any changes to the data in the cell. The HasDataChanged attribute is:
TRUE if the user types in an entry field cell or changes a cell of any other type
FALSE when the value of the cell is changed by a 4GL script
A 4GL script can also set the HasDataChanged attribute of a CellAttribute, a column field, or an entire table field. For example, you might set HasDataChanged to FALSE after processing changes.
If you intend to use this attribute, ensure that its information is accurate by turning on the cell attributes explicitly in either of these ways:
In the Property Inspector when you create the frame
By setting the HasCellAttributes attribute when the frame is initialized at runtime