Returns True when the Transaction is in Insert mode. Otherwise, it returns False.
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.
Update function
Delete function