1

I am new to Domino designer and lotus script,

following my first question

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

Googled for it but found a link to save to db solution.

I tried

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

If possible please provide links to sites where DB and view are discussed along with codes.

Thanks in advance

The above one is solved! Thanks Knut

Edit 1:

I want to create a Java agent which will generate a text file (create a simple report) of the data in the database .

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

Community
  • 1
  • 1
theRoot
  • 571
  • 10
  • 33
  • 1
    Edit 1: although this should be a new question here is the short answer: create the Java agent in Domino Designer at menu Create/Design/Agent and choose "Java" as Type. – Knut Herrmann Jan 21 '15 at 11:26

1 Answers1

6

1)

Add Call doc.Save( False, False ) after doc.addrfield = myText. Only this will save the changes you made in document.

2) + 3)

Create a form "Main Topic" in Domino Designer and add the fields you want to see when opening a document which has field Form = "Main Topic"

Create a view in Domino Designer. Create columns which show your fields you created in document

4)

Read this http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg246854.html?OpenDocument as an introduction to classic Notes application development.

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67
  • updated the ques..Thanks for your response.(now I can view DB fields via Views)...I understood how DB works from [site u pointed out](http://www.nsftools.com/misc/WhatIsNotes.htm).. – theRoot Jan 21 '15 at 11:20
  • @Kunt can you have a look at [this](http://stackoverflow.com/questions/28069239/issue-in-setting-unique-id-in-domino-designer) – theRoot Jan 21 '15 at 16:08