在Domino Designer中设置唯一ID的问题 [英] Issue in setting unique ID in Domino designer
问题描述
我是Domino设计师和Lotus脚本的新手,
I am new to Domino designer and lotus script,
遵循我的我在设置唯一ID(表单中的ID字段)时遇到了一些问题.
I have some issue in setting unique ID (for id field in form).
我的ID字段值公式:
T_List:=@DbColumn("" : "NoCache"; "Local"; "DBintro";"testview"; 1); @If(@IsNewDoc & @Elements(T_List)=0;1;@IsNewDoc & !@IsError(T_List);@Subset(T_List;1) + 1;id)
T_List:=@DbColumn("" : "NoCache"; "Local"; "DBintro";"testview"; 1); @If(@IsNewDoc & @Elements(T_List)=0;1;@IsNewDoc & !@IsError(T_List);@Subset(T_List;1) + 1;id)
我在本地拥有DB(什么都没有共享).
I'm having DB in local (nothing shared).
引用了此链接通过AndrewB
referred this link an Answer by AndrewB
服务器:本地
Server : Local
DBname:DBintro
DBname : DBintro
视图名称:testview id-表单中的字段(在需要保存到DB中时设置)
view name : testview id - field in the form (which is set when required to save in DB)
我遇到错误
字段ID!不存在
Field id ! does not exist
请帮助我摆脱困境. 谢谢
Please help me to get out of this.. Thanks
1更新了代码
T_List:=@DbColumn("" : "NoCache"; "Local"; "DBintro";"testview"; 1);
T_List:=@Sort(T_List; [DESCENDING]);
@if(@Iserror(T_List);
1;
@Subset(T_List;1)+1
);
推荐答案
将字段"testid"的类型设置为"Number"
将公式更改为
Set type of field "testid" to "Number"
Change formula to
_List:=@DbColumn("" : "NoCache"; ""; "testview"; 1);
@If( @IsError(_List);
1;
_List = "";
1;
@Subset(_List; 1) + 1
)
将列排序设置为降序"
Set column sort to "Descending"
这篇关于在Domino Designer中设置唯一ID的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!