The following example is the onClick event handler for a Reply button in an E-mail viewer. It copies the name from the From field of the original to the To field of the reply and duplicates the Subject field. After setting the value properties, the rowset’s modified property is set to false to indicate that these are the default values.

function replyButton_onClick( )

   local cTo, cSubject 

   cTo = form.rowset.fields[ "From" ].value 

   cSubject = form.rowset.fields[ "Subject" ].value 

   if form.rowset.beginAppend( ) 

      form.rowset.fields[ "To" ].value = cTo 

      form.rowset.fields[ "Subject" ].value = cSubject 

      form.rowset.modified = false 

   endif