Hi All,
In Rbase 9.5 32, I have a form with a scrolling region. 
I would like to assign a unique value to column such that each new row has a 
unique random value.
For other columns, I would like to have all the new rows have the same value 
such as today's date.
I know I can do this easily in the add variable / expression builder area, but 
somebody said that is not a great way to do it because it can slow down the 
form since each expression is recalculated evertime a field is exited. 
When I try to add rows, I tried using an ON EXIT EEP from a field to update the 
column with a unique flag, like this....
 
SET VAR vrand = (RANDOM(999999999))
UPDATE tablename SET column name = .vrand WHERE uniqueflag IS NULL
(I know I have 1 chance in 999999999 that the value won't be unique, I can live 
with that)
 
That seems to work for every row except the last row I add. The last row does 
not get any value.
 
What is the right way to give each new row a unique column value within a 
scrolling region? I think my problem might that I am choosing the wrong type 
off EEP. Is there an ON EXIT ROW EEP?
 
Mike

Reply via email to