|
Description
Function BeforeAdd is executed before a record
is physically added to the database.
Syntax
|
BeforeAdd(values,message,inline,pageObject)
|
Arguments
values - array of values to be written
to the database. To access specific field value use values("FieldName").
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.
If the field was assigned an
alias in the SQL query, then the values array will get the alias
instead of field name from the database. E.g. if you have SQL query
select salesrep_id AS
Inv_Salesrep ..., you should use values("Inv_Salesrep").
message - place the message to be
displayed into this variable.
inline - equals to true when the
Inline Add in process, false otherwise.
pageObject - an object representing
the current page. For more information, see Page class.
Return value
True: continue with adding a
record.
False: record would not be added.
Applies to pages
Add, Inline Add
Recommended predefined actions
and sample events
Send
a simple email
Send an email with new
data
Save new 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
Select multiple values from checkboxes
or a list field and have them appear as individual database
entries
Update multiple tables
Rename uploaded files
Speed up data entry using
events
|