I am trying to create a "Heat Ticket' custom number to show when we add a new entry. I used the code from another listing, added it to the "Table Events:Add page: Before process.
$sql="select max(substr(Heat_Ticket,9)) as mx from customer_service_log where substr(Heat_Ticket,7,2)=month(now()) order by mx";$rs=CustomQuery($sql);$data=db_fetch_array($rs);$str="HT";$str2=date("Ym");$str3=($data["mx"]+1);$values["Heat_Ticket"]="$str$str2".str_pad($str3, 5, 0, STR_PAD_LEFT);
The after record event sends an email with the created number, unfortunately on the add page, nothing shows until after it is added. I need this to show prior to the record being added as a reference.
Any help is appreciated.