Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Table events > Import page

Before record inserted

Scroll Prev Next More


The BeforeInsert event is executed before a record is inserted during import. Use this event to modify the import data before it is saved in the database.


public XVar BeforeInsert(dynamic rawvalues, dynamic values, dynamic pageObject, dynamic message)



raw field values from the imported file.


an array of values to be written to the database. To access a specific field value, use values["FieldName"].

Note: Field names are case-sensitive. If the field name is PlayerId, you should use values["PlayerId"]. Note that values["playerid"] or values["PlayerID"] will not work.


Note: If the field was assigned an alias in the SQL query, then the values array will get the alias instead of the field name from the database.

E.g., if you have an SQL query SELECT salesrep_id AS Inv_Salesrep ..., you should use values["Inv_Salesrep"].



an object representing the current page. For more information, see RunnerPage class.

dynamic message

this message will be added to the Import Log if the record wasn't imported

Return value

True - the record is inserted.


False - the record is not inserted.

Applies to pages


Recommended predefined actions and sample events:

Insert a record into another table

Check to see if a specific record exists

Display a message on the Web page

See also:

After import finished

Before import started

Export/Import pages

AJAX helper object: setMessage ()