如果取得当前文档某个域的域值(lotuscript)

xjbx
博客专家认证
2003-03-28 07:45:04
如题
...全文
86 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xjbx 2003-03-29
  • 打赏
  • 举报
回复
谢谢各位了!
BillyW 2003-03-29
  • 打赏
  • 举报
回复
dim uiws as new notesuiworkspace
dim uidoc as notesuidocument
dim doc as notesdocument
dim strYouWant as string

set uidoc=uiws.currentdocument
set doc=uidoc.document
set strYouWant=doc.FieldNameYouWantToGet(0)
messagebox strYouWant
粘按钮里就好用!!!
jiaojianjj 2003-03-29
  • 打赏
  • 举报
回复
最好用公式@GetDocField,这样快一些,不懂可以去看看帮助
jimmyvk 2003-03-29
  • 打赏
  • 举报
回复
这么长,治学严谨呀.
......
dim tmpstring as string
tmpstring=doc.fieldname(0)
......
cjxs 2003-03-28
  • 打赏
  • 举报
回复
如果是取域值的应该是这样:
dim ws as new NotesUIWorkspace
dim uidoc as NotesUIDocument
dim doc as NotesDocument

set uidoc=ws.CurrentDocument '/取得当前表单对象
set doc=uidoc.Document '/取得当前表单的文档(数据)对象

'/以下为标准的取值代码,据LotusScript开发规范规定
ItemValue=doc.GetItemValue("ItemName")(0)

'/如果是多值域的话:
itemValues=doc.GetItemValue("ItemName")


* 另附:
如果在表单相关事件中编写,可以使用表单事件中提供的Source as NotesUIDocument 参数:
dim doc as NotesDocument
set doc=Source.Document
itemvalue=doc.GetItemValue("ItemName")(0)
flyeyer 2003-03-28
  • 打赏
  • 举报
回复
有很多种方法: doc.fieldname(0)=temp
temp = uidoc.FieldGetText( "fieldname" )
但是后一种只能取出字符串,如果是数组可以这样
forall v in doc.filedname
temp=v
end forall

536

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧