Pulling a view into a rich-text field

15 pts.
I'm looking for LotusScript code that would pull a view into a rich-text field, preferably into a table. Lotus won't allow you to use embedded views from other databases in your forms, so this script would run PostOpen to pull the data for the rich-text field based on the "name" field - or something similar (unless it's a new document). Any help would be GREATLY appreciated!

Answer Wiki

Thanks. We'll let you know when a new response is added.

If the database that houses the view data is available over HTTP, you could use the ?ReadViewEntries CGI to get the view data in an XML format, then use one of the available parsers to parse and build the information in a Rich Text field. Another option is to open the view and just bring in the HTML and make the items in the Rich Text field a MIME format so that it will render in the Notes client, kind of like and HTML email does. This way it is already formatted in a table structure.

As for code to do this, I don’t have any, in theory both should work. Look for the the GetDocumentByURL method, it returns a web page in a document format which can be easier to parse.

Mike Kinder

Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Wasii
    The form is through a Notes Client - not the web. I created a view navigator, then parsed the info from that into a table in a rich-text field (including doc-links to the original documents). The trouble I'm having now is when I attempt to run the code on "post open", when I close and re-open the uidoc (to refresh the rich-text fields) I'm getting a stack error. The error doesn't occur when I run the code from a "click" event on a button...
    15 pointsBadges:
  • Stiletto
    a) If you aren't setting and checking a flag in your postopen, then the problem might be that closing and re-opening the uidoc will call postopen again; you wind up recursively calling the same code until you crash. You could set a flag the first time through and check for it so that subsequent runs don't keep closing and re-opening. b) Have you tried using "Call notesUIDocument.Refresh( [ IncludeRichTextItems ] )" instead of closing and re-opening?
    5,545 pointsBadges:
  • SlikTool
    Even if the application portion you are doing is in the client, but the view is available over HTTP - which means HTTP is turned on, on the server that hosts the application, my original suggestion can be used. Mike Kinder
    1,870 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: