How to create an auto incrementing field in lotus domino?

前端 未结 4 2022
面向向阳花
面向向阳花 2020-12-07 04:22

I have an application in lotus domino with a field

UNIDID-number(computed)...

I want that every time a new entry is created, this field to inc

4条回答
  •  情书的邮戳
    2020-12-07 05:03

    This formula is from my technical notes database, generates a sequentially increasing number using a computed when composed field on the form so user can see the number but it is only fixed when you save the document.

    T_List:=@DbColumn("" : "NoCache"; ""; "RefNumView"; 1); @If(@IsNewDoc & @Elements(T_List)=0;1;@IsNewDoc & !@IsError(T_List);@Subset(T_List;1) + 1;RefNumber)

    You need a view first column sorted in descending order with the field that stores your number, if the view has no records the code above starts numbering at 1

    The database was developed in Notes 4.5 but I'm still using it now with 8.5 notes client & designer and have never needed to change the formula, indeed its been reused many times over the years in all the later versions. It won't work if documents are created on multiple servers, for that the scheduled agent is the only way to get a truly unique sequential numbering.

提交回复
热议问题