The rowset’s fields array contains a Field object for each field in the row. In addition to static information, such as the field’s name and size, the most important property of a Field object is its value.

value property

A Field object’s value property reflects the value of that field for the current row. It is automatically updated as the rowset’s row cursor is moved from row to row.

To change the value in the row buffer, assign a value to the value property. If the row is saved, those changes are written to disk.

Important

When referring to the contents of a field, don’t forget to use the value property. For example,

this.form.rowset.fields[ "Species" ].value

If you leave out value,

this.form.rowset.fields[ "Species" ]

you are referring to the Field object itself, which is rarely intentional—except for dataLinks, explained next. Get in the habit of including value when referring to a field; if you don’t, the code doesn’t work.

UsingdataLinks

Just as a Field object’s value property is linked to the actual value in a table, a visual component on the form (such as a Select List or RadioButton) can be linked to a field object through the form component’s dataLink property. This property is assigned a reference to the linked Field object. When connected in this way, the two objects are referred to as dataLinked.

As the rowset navigates from row to row, the Field object’s value is updated, which in turn updates the component on the form. If a value is changed in the form component, it is reflected in the dataLinked Field object. From there, the change is saved to the table.