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  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Previous Next
Subject: Refresh Rich Text \ Agent needs running 3 times
Feedback Type: Question
Product Area: Notes Client
Technical Area: Application Development
Platform: Windows
Release: 8.5.2
Reproducible: Always

I have code that needs to do the following:

1) Takes a document in, but changes the "form" used, to be the "Table" form (which takes the Rich Text Fields out of the "Table Design" elements and sections, onto a basic document with no formatting (since otherwise I can't process the Rich Text Fields.

2) Then it gets the Rich Text fields, and (if they contain tables) it uses the GetField method to get HTML representations of the fields, then outputs aspx (or html) files.

3) At also processes any attachments on the document.

4) It also writes out a pdf representation of the document (that uses another, different form, which just takes an abstract of the text in the Rich Text fields.

Ultimately I do get the result I want in test however, I have to run the agent 3 times?!?
I thought it was a Refresh issue at one point so I wrote another agent to trigger the main one and do a refresh:

Bit reluctant to Share all the code because it's so long (and split into functions), but for example:
Dim olddocAttachments As NotesItem
Dim olddocProjCoordComm As NotesItem
Dim olddocAdminComm As NotesItem

Set olddocAttachments = doc.GetFirstItem( "Attachments" )
Set olddocProjCoordComm = doc.GetFirstItem( "ProjCoordComm" )
Set olddocAdminComm = doc.GetFirstItem( "AdminComm" )

createddoc.Form = "NP&PCSUBTABLE5"
Call createddoc.CopyItem( olddocAttachments , "Attachments" )
Call createddoc.CopyItem( olddocProjCoordComm , "ProjCoordComm" )
Call createddoc.CopyItem( olddocAdminComm , "AdminComm" )
Call createddoc.ComputeWithForm( False, False )
'Call createddoc.
' Call createddoc.Send("","")
'if createddoc.

' doc.CopyItem("Attachments")
' doc.CopyItem("AdminComm")

'doc.fields = "values"


If(createddoc.HasItem("Attachments")) Then
Set rt1doc = createddoc.GetFirstItem("Attachments")
Call createddoc.Save(True,False,True)
Set rtn1doc = rt1doc.CreateNavigator
End If

' Attachments
If(createddoc.HasItem("Attachments")) Then
Set rt1doc = createddoc.GetFirstItem("Attachments")
Call createddoc.Save(True,False,True)
Set rtn1doc = rt1doc.CreateNavigator
End If

'next field
If(createddoc.HasItem("AdminComm")) Then
Set rt2doc = createddoc.GetFirstItem("AdminComm")
Call createddoc.Save(True,False,True)
Set rtn2doc = rt2doc.CreateNavigator
End If

'next field
If(createddoc.HasItem("ProjCoordComm")) Then
Set rt3doc = createddoc.GetFirstItem("ProjCoordComm")
Call createddoc.Save(True,False,True)
Set rtn3doc = rt3doc.CreateNavigator
End If

Dim lstOfRowNumbers
Dim cellCounter As Integer
cellCounter = -1
Dim empList List As Double

Dim lstOfRowNumbers2
Dim cellCounter2 As Integer
cellCounter2 = -1
Dim empList2 List As Double

Dim lstOfRowNumbers3
Dim cellCounter3 As Integer
cellCounter3 = -1
Dim empList3 List As Double

'Attachments FIELD
If Not rtn1doc.FindFirstElement(RTELEM_TYPE_TABLE) Then
'Do Nothing
' Messagebox "No tables in the attachments field,",, "No tables"
End If
If rtn1doc.FindFirstElement(RTELEM_TYPE_TABLE) Then
Dim rtt As NotesRichTextTable
Set rtt = rtn1doc.GetElement

Dim labelString As String
labelString = ""

Forall label In rtt.RowLabels
If(label <> "") Then labelString = labelString & Chr(13) & " " & label
cellCounter = cellCounter + 1
empList(cellCounter) = cellCounter
End Forall
End If

'End Attachments FIELD

Feedback number WEBBB49KYS created by Generic Notes Developer on 09/03/2018

Status: Open

Refresh Rich Text \ Agent needs run... (Generic Notes D... 3.Sep.18)
. . Dunno, never had to run something 3... (Mike Woolsey 18.Sep.18)


Search this forum

Member Tools

RSS Feeds

 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