Hi all,
I hv formA with dataSource tableA
tableA hs fields : itemID, Qty, Status
In formA I can add qty minus or plus.
But whenever I add the minus Qty, i need to check to sum(Qty) in tableA whether the Qty is below 0 or not .
I wrote this, but doesnt work
method: validateWrite
tableA a;
while select sum(Qty) from a group by a.ItemId where a.status::bad
{
if (Qty<0)
{
error("Message");
ret=false;
}
}