例如有一个视图:MAINVIEW
我现在用鼠标选定了4个文档,现在想在此视图上建立一个操作,更新我选定的这四个文档的AA域的值为“测试数据”,
请问代码是怎么写的,我的环境是C/S,在帮助里面找到的是GETFISTDOCUMENT,好像实现不了?谢谢了
------解决方案--------------------
建立代理,简单公式:Field AA:="测试数据",选中,执行一下就可以了
------解决方案--------------------
在视图上做一个操作按钮,[email protected]( "AA" ; 测试数据");
选中文档点击按钮就可以了
------解决方案--------------------
LotusScript :
Dim field as String
Dim value AS String
Dim wk AS new NOtesUIWorkSpace
DIm dc As notesdocmentCollection
dim doc as notesdocment
field =trim(InputBox(""))
value =trim(InputBox(""))
if field="" then
eixt sub
end if '异常处理
set dc=wk.currentview.docments '取得视图中选中文档
if dc.count>0 then '
set doc=dc.getFirstDocment
else
exit sub
end if
for i=1 to dc.count
if doc.hasItem(field) then
call doc.repaceItemValue(field,value)
call doc.save(true,true)
else
msgbox "域名不存在",64,""
exit sub
end if
set doc=dc.getnextdocment(doc) '取得下个文档
next '遍历结束
exit sub '退出