[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating Response Document Using LotusScript

Posted on 2003-11-13
7
Medium Priority
?
1,172 Views
Last Modified: 2013-12-18
I'm fairly new to notes and still getting used to the syntax.
So I need help with the following:

I have a form and a response form(they are identical).

I want a button on my parent form which when clicked creates a response
document with the parent documents values it and opens the the
parent document in edit mode.

This is what I want the code to look like:

Dim workspace As New NotesUIWorkspace
===============================================
This is where I need the code that creates the
child form sets its values and it
Note: Code here will only set up the values for the child document.
         A different button will actually save the response document.
         So some sort of Global variables need to be used
===============================================
Call workspace.EditDocument( True )
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument

Thanks.......
0
Comment
Question by:marefin
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 9743471
Hi marefin,
> when clicked creates a response
> document with the parent documents values it and opens the the
> parent document in edit mode.

Your description seems like it has a piece missing.  What do you want to do with this response?  It sounds like you want to create the respnse in teh background but never show it, and then allow the user to edit the main.

Sounds like you might want to just use the built-in versioning feature.

Best regards,
qwaletee
0
 
LVL 5

Expert Comment

by:apparition
ID: 9743537
Actually what I'm trying to do is Have a button on the
Parent form that says "Create new version"
What this will do is allow the user to edit the document
but save the exhisting data in another document as a response.
So every time the user clicks on the button a new version is created
while the older one becomes a response.

I don't know much about built in version controlling, if doing it that
way accomplishes what I want to do the I all for it.

Please provide feedback.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9743548
Well Qwaletee has a point if you are intended to do something like that.

But if you are talking about two different forms then go for script.

Anyway Are you planning to copy all the fields into the child ?

Dim session as New NotesSession
dim db as NotesDatabase
dim child as NotesDocument

set note = uidoc.Document  ' uidoc should be set

set db = session.CurrentDatabase
set child = New NotesDocument(db)
call note.CopyAllItems( child, true )  ' If you are planning to do selective copy then do this child.Field1 = note.Field1
child.Form = "Child Form Name"

child.save true, false

~Hemanth

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 100 total points
ID: 9743561
Well then versioning is something that you might want to take a look at. Here is the help documentation describing how to enable versioning

http://www-12.lotus.com/ldd/doc/domino_notes/5.0/help5_designer.nsf/078c27b23262ffff852566dd0029426a/4248ab357568780f8525672f007a0dd9?OpenDocument
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 400 total points
ID: 9744158
apparition,
In FORM PROPERTIES, on the first tab, there is a "versioning" section.  You want the option "Prior versions becomes responses."  that's al yu have to do.  No second form, no buttons, nothing.  If anyone saves the document using a Notes client, Notes will, before saving the new version, copy the old version to a new response document.
0
 

Author Comment

by:marefin
ID: 9747954
guys,

I am using notes built in Version Control as you suggested but I'm running into one problem. If I chose to edit the document
it also saves it as a newer version. In my application theres to buttons one is "Create new version" and the other is "Edit".
The function of edit being ability to edit the document not save the prior version as a response, only clicking on create new version
will save prior version as response.

Any thoughts?
0
 

Author Comment

by:marefin
ID: 9748300
Got it I'm using
uidoc.SaveNewVersion
or
uidoc.SaveNew

Depending on which button is clicked

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

873 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