form object calculate and copy the same result in other line why ?

hi

I create in form salestable exacctaly in salesline an realedit it is not field in database it take a resultof devision for exemple:

real q,c,f ;

;

q=c/f;

realedit.pastetext(num2str(q,0,0,0,0),false);

the realedit take the result but when i create another salesline all the line take the new result why ?

how i can resolve this probleme ?

thank you

Where did you placed this code?

Did you place the display method in the grid of the SalesTable form? Maybe you can add the field in a pageTab en try again.

I put this code in “textchange” “modified” and “lostfocus” “gotfocus” of salesQty Field in form but it give the same result

real q,c,f ;

;

q=c/f;

realedit.pastetext(num2str(q,0,0,0,0),false);

Did you place the display method in the grid of the SalesTable form?

yes I do But it don’t work too and give somme bug when I click to add new record