4D v13Video script |
||
|
4D v13
Video script
Video script
In this video, we're going to learn how to configure database events and how to take them into account in the programming.
In that sense, a trigger is a method like any other. It's simply the context in which it is executed that changes. Like form events, database events must be checked so that 4D gives control to the trigger to execute. We can enable any database event in the Table inspector. You’ll find the “Edit” button at the bottom right, which allows creating the method to execute when the checked events occur. The method is generally structured in the following manner: $evt:=Database event `What is the number of the event being executed by the database event? Unlike a form method that is only executed during a display (or print), a trigger is executed regardless of how you access records:
The trigger has the advantage of being a mandatory passage point.
[Interventions]Date_Last_Modified:=Current date Of course, this latest modification will also be valid when creating a record. Let's try it out by performing a modification:
|
PROPERTIES
Product: 4D |