如何通过 Lotus Script 在 domino designer 中将表单值保存到数据库

how to save form values to DB in domino designer by Lotus Script

我是 Domino 设计器和 Lotus 脚本的新手,

关注我的

1) How can I save form values to DB

2)How can I view DB( like MS access)

3) How to create view to retrieve values from DB

用 Google 搜索但找到了 link to save to db 解决方案。

我试过了

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

    Dim session As New NotesSession
    Dim db As NotesDatabase

    Set db = session.CurrentDatabase
    Set doc = New NotesDocument( db )
    doc.Form = "Main Topic"
    doc.Subject = "Here's a new document"
    Call doc.Save( False, False )//I think it is saving here but don'y know where it saves

    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(0)
    Msgbox "Data entered in addrfield : "+ enteredText 
End Sub

But I don't know where it is saving my form fields

如果可能,请向讨论数据库和视图以及代码的站点提供 links。

提前致谢

上面一个就解决了!谢谢克努特

Edit 1:

我想创建一个 Java 代理,它将生成数据库中数据的文本文件(创建一个简单的报告)。

How can I add Java Agent ? How can I get access data(form fields) in the database ? Where should I place the java code?

1)

doc.addrfield = myText之后添加Call doc.Save( False, False )。只有这样才能保存您在文档中所做的更改。

2) + 3)

Create a form "Main Topic" 在 Domino Designer 中添加您希望在打开具有字段 Form = "Main Topic"

的文档时看到的字段

Create a view 在 Domino Designer 中。创建显示您在文档

中创建的字段的列

4)

阅读此 http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg246854.html?OpenDocument 作为经典 Notes 应用程序开发的介绍。