我是Domino设计师和Lotus脚本的新手,
我尝试通过以下方式访问我的文本字段:
Sub Click(Source As Button)
Dim myText As String
myText = Inputbox("insert some text :","Testing Heading","Default value test",100,100)
Msgbox "you have entered : "+myText
[myfield].text = myText //error
End Sub
但它显示错误:
命名产品字段不存在
用Google搜索但无法找到解决方案。
还有一个,为初学者搜索了多米诺骨牌设计师创建表单,视图和数据库的教程。但是找不到一个。
如果可能,请提供指向教程网站的链接。
编辑1:
Sub Click(Source As Button)
Dim myText As String
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim enteredText As String
myText = Inputbox("insert some text :","Testing Heading","Default value",100,100)
Msgbox "you have entered : "+myText
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
doc.addrfield = myText
enteredText = doc.addrfield
Msgbox "Data entered in addrfield : "+ enteredText //error
End Sub
错误:
未设置对象变量
编辑2:
@Knut
在Domino Designer中,如何创建数据库表?
我的意思是创建表<tablenam> (field1,feild2,..)
;
我该如何访问它。我提到this。这个人告诉我如何连接到数据库,但没有显示如何创建数据库表。
答案 0 :(得分:2)
您必须使用LotusScript Notes类
您的示例将如下所示:
Sub Click(Source As Button)
Dim myText As String
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
myText = Inputbox("insert some text :","Testing Heading","Default value",100,100)
Msgbox "you have entered : "+myText
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
doc.myField = myText
End Sub
您可以使用doc.ReplaceItemValue代替。它为您提供了更多的灵活性。
Designer help file本身为您介绍了“应用程序设计”一章中的Notes开发。