Official Content

Returns True when the Transaction is in Insert mode. Otherwise, it returns False.

Syntax

Insert

Type Returned:
Boolean (True or False)


Scope

Objects: Transaction


Samples

Consider the following Transactions: 

Product
{
  ProductId*
  ProductDescription
  ProductStock
  ProductLastPurchasePrice
  ProductLastPurchaseDate
}

Order
{ 
   OrderId*
   OrderDate
   ProductId
   ProductLastPurchasePrice
   ProductLastPurchaseDate
   OrderPrice
}

ProductLastPurchasePrice and ProductLastPurchaseDate store the price and date of the last completed order for ProductId respectively.

The assignment of attributes has to be defined within the Order Transaction rules as shown: 

ProductLastPurchasePrice = OrderPrice if Insert;
ProductLastPurchaseDate  = OrderDate  if Insert;

Such assignment implies an update of some of the tables belonging to the extended table of the current level (Order).

So, every time a new Order is inserted, the Product table is updated with that date and price.

Note: In the iSeries environment, when an error rule for a certain mode is defined, the corresponding code to support this mode is not generated.

See Also

Update function
Delete function


 
Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant