Hi,
How can i set the default value of a field when adding a new record ?
Specificaly i have a UUID field that id like fill using the result of a SQL SELECT statment ( mariadb ).
if I use the following in the beforeinsert event it works fine but obviously the UUID field on the form remains blank
If ({uuid} == ‘’) {
$sql_next_rec=“SELECT UUID()”;
sc_lookup(rs, $sql_next_rec);
if (isset({rs[0][0]})) // Row found
{
{uuid} = ({rs[0][0]}) ;
}
}
any help appreciated
cheers