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

Mark XY Brown 13.Jul.11 11:32 AM a Web browser
Domino Designer 6.0.3 Windows XP

Hi All

I rolled out a new version of our internal RFC database two days ago, and so far all is well. I had one hitch which I managed to brute-force my way around, but I wondered if Notes was acting as it is supposed to?

Once of the features of the second version of the database was increased control over whop could edit documents. To achieve this, I downgraded the standard user group's access level from Editor to Author. I also converted a couple of Names-type fields on the main RFC form to Authors-type, and added some more computed ones. This means that the allowable authors of a document are:
*The person who created it
*The person on whose behalf it has been created (if applicable)
*The team responsible for implementing the change
*The people named on the AppActGroup document "Service Delivery" and the default designer account.

All went well under testing.

When I finished rolling it out, I realised that there was a problem. Any RFCs that existed before the design change could not be edited by their creators. When I checked the document properties, the creator field was still shown as a Names field, rather than one controlling read/write access. Then I realised that in order to overcome this, the document would have to be recomputed with the form, do I wrote the following agent:
Sub Initialize
'Pick up the selected form(s) and recompute all of its(their) documents

Dim sess As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim docProf As NotesDocument
Dim docData As NotesDocument

Dim varForms As Variant
Dim strForms As String
Dim strFormula As String

Set db = sess.CurrentDatabase
Set docProf = db.GetProfileDocument("RFCProfile")
varForms = docProf.ProfFormRecalc
Set docProf = Nothing

Forall f In varForms

If strForms = "" Then

strForms = f


strForms = strForms & {":"} & f

End If

End Forall

strFormula = {Form = "} & strForms & {" & !@IsResponseDoc}

Set dc = db.Search(strFormula, Nothing, 0)
Set docData = dc.GetFirstDocument

Do Until docData Is Nothing

Call docData.ComputeWithForm(False, False)
Call docData.Save(True, False, False)

Set docData = dc.GetNextDocument(docdata)


End Sub

[The named profile document field holds a list of form aliases. This enables me to re-run the agent without having to edit it each time.] To my surprise, this didn't work. I did some digging, and tried a Formula agent instead, making use of @Command([ToolsRefreshAllDocs]). This also didn't work. In desperation, I added the following declaration and statements:
Dim itmAuthField As NotesItem

Set itmAuthField = docData.GetFirstItem("RFCRaiser")
itmAuthField.IsAuthors = True
Set itmAuthField = docData.GetFirstItem("RFCRaisedFor")
itmAuthField.IsAuthors = True

The statements went above the ComputeWithForm statement. This worked - my colleagues had their author rights again!

My questions (if you're still with me):
*Is my conclusion about the need to recalculate the documents in order to pick up new field types correct?
*If so, why didn't ComputeWithForm affect the items' types?


Names to Authors field - odd behavi... (Mark XY Brown 13.Jul.11)
. . RE: Names to Authors field - odd be... (Tony Campbell_C... 13.Jul.11)
. . . . RE: Names to Authors field - odd be... (Mark XY Brown 14.Jul.11)

  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