Actions Example 8: Automatic Insert in Child Table and Related Box |
This Info Window has bookings in a parent box and participants in an embedded child box. Assume that it is frequent that the customer booking the reservation (parent box) is also a person included in the reservation as a participant (child box). A button "Add Person Booking..." automates the action of including the booker as a participant.
RecordStore(QUIET) SqlScript ( INSERT INTO participant(person_id,res_id,insurance) VALUES(:MADE_BY,:RES_ID,'N') ) Participants_taking_part_in_Reservation.QueryExecute() Participants_taking_part_in_Reservation.query.person_id.esd_int.ControlSetFocus()
INSERT INTO participant(person_id,res_id,insurance) VALUES(:"query.made_by()",:"query.res_id()",'N') )
|