Hi i've do this code in the Before Record added,
When i add a record, if $Kmp > 2500 i'want to get
an error, else if $Kmp i want to write something in the table...
This code works, it don't write nothing in the table if $Kmp is >2500
and if $Kmp is <2500 it writes what i want in the table, but
with this code i'cant have classic error in red (for example when
a field is required) in the top of page.
What i can do?
$KmP = $values["KmFine"]- $values["KmInizio"];
if ($KmP < 2500)
{
$values["KmPercorsi"] = $values["KmFine"]- $values["KmInizio"];
$values["OreLavorate"] = $values["OreLavorate"];
$values["LastUser"]=$_SESSION["UserID"];
return true;
}
else
{
return false;
}