[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Creating Response Document Using LotusScript

Posted on 2003-11-13
7
Medium Priority
?
1,147 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
[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
  • 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
Industry Leaders: 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!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

650 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