Please enable JavaScript to view this site.

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

Events.OnLoad

Scroll Prev Next More

Description

The CopyOnLoad event is executed when an Add page is loaded in a Copy mode.

Syntax

public XVar CopyOnLoad(dynamic values, dynamic where, dynamic pageObject)

Arguments

values

an array of values to be displayed on the page. You can modify the values of this array.

Note: To access a specific field value use values["FieldName"].

Example: to clear the PassportNumber field value before copying, use values["PassportNumber"]="".

 

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"].

 

where

WHERE clause that points to the record to be copied. Example: ID=19.

pageObject

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

Applies to pages

Add page (in Copy mode).

Recommended predefined actions and sample events:

Send a simple email

Send an email with old data

Save old data in another table

Insert a record into another table

Check to see if a specific record exists

Display a message on the Web page

Redirect to another page

See also:

Choose pages screen

Export/Import pages

About SQLQuery class

About SQLQuery screen

Additional WHERE tabs