If field1 is an autonumber and primary key, and I need to capture it into a variable in beforeadd event ie., $_SESSION["field1"] = $values["field1"]; , How can I achieve this.
Bear in mind, I probably will want this field as a read only or hidden field, thus it's not in values array. In the before and after edit I capture it by passing $key to the function. However, since it doesn't exist yet on an add page, I get errors no mater how I try to get it. How can I get this new generated autonumber into a variable so I can use it in a after add event? I have no problem with this in a after edit event.