?
Solved

Adding new fields and labels dynamicly to Form in LotusScript???

Posted on 2003-03-19
8
Medium Priority
?
293 Views
Last Modified: 2013-12-18
Hello,

I have to create a questionaire application using Lotus Notes.
I don't know much about LotusScript and I'm looking for some help!!

I want to put values from a View into new dynamic added fields.
Now the values appeare in a message box.

The code:

Sub Initialize
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim doc As NotesDocument
     Dim docweg As NotesDocument
     Dim doc2 As NotesDocument
     Dim dc As NotesDocumentCollection
     Dim viewVraag As NotesView
     Dim viewAfgekeurd As NotesView
     Dim telafgekeurd As Integer
     Dim telgoedgekeurd As Integer
     Dim stringcijfer As String
     Dim cijfer As Integer
     Dim nummer As Integer
     Dim vraag As String
     
     Set db = session.CurrentDatabase
     Set viewVraag = db.GetView("vraagcommentaaroverzicht")
     Set viewAfgekeurd = db.GetView("vraagcommentaaroverzicht")
     Set doc = viewVraag.GetFirstDocument
     nummer = -1
     While Not(doc Is Nothing)
          nummer = nummer +1
          telafgekeurd = 0
          telgoedgekeurd  = 0
         
          vraag = doc.txt_vraagcommentaar(0)
          stringcijfer = doc.rb_cijfers(0)
          cijfer = stringcijfer
         
          Msgbox vraag
          Msgbox cijfer
         
          Set dc = viewAfgekeurd.GetAllDocumentsByKey(cijfer)
          Set doc2 = dc.GetFirstDocument
          While Not(doc2 Is Nothing)
               Msgbox cijfer
               If doc2.vraagcommentaaroverzicht(rb_cijfers) = "2" Then
                    telgoedgekeurd = telgoedgekeurd + 1
                    Msgbox telgoedgekeurd
               Elseif doc2.vraagcommentaaroverzicht(rb_cijfers) = "3" Then
                    telafgekeurd = telafgekeurd + 1
                    Msgbox telafgekeurd
               End If
               Set doc2 = dc.GetNextDocument(doc2)
          Wend
          Set docweg = doc
          Set doc = viewVraag.GetNextDocument(doc)
         
          If telafgekeurd > telgoedgekeurd Then
               Msgbox "Deze vraag mag worden weggegooid"
               Call docweg.Remove(True)
          End If
          nummer = -1          
     Wend
End Sub

I hope someone can help me...

Greetings Hanszie
0
Comment
Question by:hanszie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 8165745
Look for this two methods of NotesDocument:

doc.AppendItemValue( FieldName$, FieldValue )

Call doc.RemoveItem( FieldName$ )

Good luck,
Zvonko

0
 

Author Comment

by:hanszie
ID: 8165863
thanks zvonko,

but "doc.AppendItemValue( FieldName$, FieldValue )" did not work.

I want to put fields on a Form not in a View.
0
 
LVL 63

Accepted Solution

by:
Zvonko earned 152 total points
ID: 8165992
There is NO way to change Form design with LotusScript.

This NotesDocument.AppendItemValue() creates new Field Values. The field values are contained in the stored Document. But the Fields are visible on the Form first after they are added trough Designer.

There is no way to create Fields on a Form without Designer (in R5).

Sorry to bring bad news.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Expert Comment

by:Arunkumar
ID: 8166615
Bad news with points ?  Enjoy!

And hanszie - Zvonko is right.
0
 

Author Comment

by:hanszie
ID: 8166645
ok thats bat...

does somebody has an other idea for my problem.
0
 
LVL 63

Assisted Solution

by:SysExpert
SysExpert earned 148 total points
ID: 8168490
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question