INS keyword

Applies to

The form's primary collection and for grid components bound to subcollections

Description

Used to provide a way for a form to instruct the middleware to perform custom processing for inserting new records.

Syntax

The format for the parameters is a comma-delimited list of specifications, which is one of these:

  • method(methodparms)
  • STD
  • REF

Remarks

  • STD means performs the standard insert processing at this point.
  • REF means refresh the data at this point.
  • The method specification means call the specified method at this point.

The parameters to the method have the format of a comma-delimited list of values which are either a single-quoted string literal, a number, or a property name. Values that are property names can be optionally preceded by BYREF, which indicates that the method's parameter is a by-reference parameter. For parameters that map to an "Infobar" type stored procedure parameter, specify MESSAGE.

Example

This example illustrates these concepts.

 "INS(Presto(BYREF AbcDesc,'from override',7,AbcCode),STD,REF))"

This keyword overrides the standard update procedure for inserts, instructing the middleware to first run the method "Presto", passing it four parameters. (Presto is a method on the IDO associated with this form). The first parm is the value of property AbcDesc, and is a reference parameter. The second is the string literal "from override". The third is the numeric literal 7. The fourth is the value of the property AbcCode. The middleware is further instructed to perform standard insert processing after the method completes, and subsequent to that, to refresh the values.