The following example saves the user’s network ID to all newly created rows.

function invoice_onAppend( )

   this.fields[ "USER_ID" ].value := id( ) 

   this.modified := false 

This event handler could be used in combination with a table that has default values set for certain fields, like a timestamp for the date and time of entry. The user’s network ID is not something the database engine can get, so you have to set this manually.