Hello !
i'm creating a form in order to write data in a table and show it in the form . That form only show the data related to a number order and sort by a specific int called ordre. (we first show the line with ordre =1, then ordre =2 ..) .
So what I want is that when I create a new line in the form, the value of ordre is automatically calculated and displayed. I put some pictures next to it so you can understand better. I saw some topics about using LineNum but I don't think it's relevant to my case because the number ordre depends on the ordernumber and not on the LineNum.
Here is what i develop for the moment : ( in the methods of the table linked to the form) :
public void initValue() { SLF_ordonnancement SLF_ordonnancement; int value; super(); select firstOnly SLF_ordonnancement order by SLF_ordonnancement.ordre desc where SLF_ordonnancement.CodeBarre == SLF_ordonnancement.CodeBarre; { value = SLF_ordonnancement.ordre 1; } SLF_ordonnancement.ordre = value; info(int2str(SLF_ordonnancement.ordre)); }