RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
May 21 2008 2:57 PM GMT
by Han8484
I use a computed text field on the form with the following code
calc := @TextToNumber(@Word
(@Implode(@Text(@DbColumn
("Notes" : "NoCache"; ""; "(DocNumber)"; 1))); " "; 1))
+ 1; @If(@IsNewDoc;@If(@IsError(calc); "0000"+"1";
@If(@Length(@Text(calc))=1;"0000"+@Text
(calc);@Length(@Text(calc))=2;"000"+
@Text(calc);@Length(@Text(calc))=3;"00"+
@Text(calc);@Text(calc))); DocNumber)
Where DocNumber is the name of the field and (DocNumber) is the name of a view created.
The view (DocNumber) must include the DocNumber field from the form only and this needs to be arranged in descending order.
Hope this helps.