Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum



PreviousPrevious NextNext

Jon Drake 9.Mar.06 10:28 AM a Web browser
Applications Development 6.5.5 Windows XP

I just read Thomas Kennedy's information on uidocs and docs for Steve C. It's a great summation. It doesn't quite explain rich text though. I did a search on AppendRTField here and got about 1000 hits (of which I only read about the first 5 pages worth) so it obviously can be sticky. After reading them I actually understood what my problem is. Fixing it is not so easy...

I have a document open (uidoc) and a handle to it my code (doc1). After changing some values (my now-infamous-checkbox) a user clicks the submit button and my agent runs. The agent loops two lists, the original (a back-end item) and the just modified (as a uidoc field) and if it finds changes it processes one by one each item in the 'change' list. There's about 5 different process cases. (The system is actually much more complex - I'm giving a simplified version for the purposes of this question)

So if a change was made and there's say 3 list values that have been detected, in one case a new response document is created. On the uidoc there is a RT field with a list of doclinks - one to each of the responses that already exist. In the case where I create a new response, I try to append the new doclink to the existing list.

The standard methods don't work, because the uidoc is still open. here's some versions:

set rtitem = doc1.getfirstitem("linkfield")
call rtitem.addline
call rtitem.appendtext
call rtitem appenddoclink(newresponse)

this fails because, uidoc.close wipes out the change

set rtitem = doc1.getfirstitem("linkfield")
set newrt - new notesrichtextitem(__, "templink")
call newrt.addline
call newrt.appendtext
call newrt appenddoclink(newresponse)

Call rtitem.appendRTItem(newrt)
gets the same result because of the uidoc / doc issue although I'm sure for a brief moment, my doclink is there

I saw Andre's example on of updating a RTF while it's still in the UI - but this isn't exactly what I need to do although it wouldn't hurt anything.

So I started to try the
saveoptions = "0"
do th rtitem stuff
doc1. save
call ws.editdocument(true, doc1 ,,,)

and what I get is a new instance of the uidoc. After the delta list of values are all processes, the uidoc then saves and closes, but here is where I get the prompt "Do you want to save..." and end up with a save conflict document

Has anyone made it this far?

All I would like to know is what would be the best steps to take to
1) have a uidoc open
2) create a response to it
3) append a doclink to a RT field on the uidoc (I don't care if it displays right away)
4) save and close my uidoc and have the link there the next time I open it.

Currently I am trying that if it hits a CreateNewREsponse (which actually is a subroutine)
then first close the uidoc, then run the subroutine, then open the uidoc again.
Another method I thought of was to pass the doclink somehow back out of the subroutine - maybe an embedded function and then finally attach that after the uidoc is saved and closed.

If anyone has followed this sad state of affairs, I'd appreciate your advice. Cheers.

uidoc, doc and RT fields (Jon Drake 9.Mar.06)
. . additional effects (Jon Drake 9.Mar.06)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite