Quick-Tipp: Dynamic HTML in Notes Forms

by Thomas Bahn,
assono GmbH, Standort Kiel,

Quick-Tipp A topic in the wish list of a Notes developer made me think: Is it possible to have some kind of dynamic HTML, like a table, in a Notes form, which can be refreshed, while the document remains open?


Actually, without the last part, it's quite easy:

  • Create a form with "Render pass through HTML in Notes" set
  • Create a computed text to calculate the HTML and mark the paragraph containing it as "Pass-Thru HTML" in the Text menu.

That's it.

When you create a document in this form,
the HTML is calculated and rendered. When you open an existing document,
you can even use this document's items in the formula of the computed text.


But (and this is a big BUT):
The HTML is only calculated, when you open the form; it doesn't get refreshed,
when you change the document's fields.


And there is a solution for this problem:

Just some more steps to do:

  • Create a form with "Render pass through HTML in Notes" set

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-1

  • Create a "Computed for display" text field named "SaveOptions" with "0" as constant value:

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-2

  • Create a "Computed when composed" text field named "Form" with the form's name (or its alias) as constant value:

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-3

  • Place some more fields on the form to later use their values. Then add a "Computed Text" and mark it as "Pass-Thru HTML" (in the Text menu):

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-4

  • In its formula calculate some HTML, like this HTML table:

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-5

  • And now for the magic: Add a button, an action, or a sub with the LotusScript code like this:

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-6

A reference to the current back-end
document (NotesDocument) is saved in the doc variable (but not on disk!),
then the current front-end document (NotesUIDocument) is closed and the
back-end document doc is opened again.


The Form field is important thus the
Notes client knows, which form to use, when the document is re-opened.
This item is created automatically, when a document is saved, but we don't
save it for now, thus we have to create it manually.


The SaveOptions field is important,
because without it, the user would be asked, if he wants to save the document,
when it get closed.

  • To save a document in this form, you have to remove the SaveOptions item:

Quick-Tipp-Dynamic-HTML-in-Notes-Forms-7


You can download a very small sample
database with the HTML form I created here: DynamicHTMLInNotes.zip.

Technical article Development

Sie haben Fragen zu diesem Artikel? Kontaktieren Sie uns gerne: blog@assono.de

Do you want an individual solution? Contact us

More interesting entries

Any questions? Contact us.

If you want to know more about our offers, you can contact us at any time. There are several ways to contact us for a non-binding first consultation.

We don’t sell your data. 100% guaranteed. See: Privacy Policy
assono GmbH

Location Kiel (headquarters)
assono GmbH
Lise-Meitner-Straße 1–7
24223 Schwentinental

Location Hamburg
assono GmbH
Bornkampsweg 58
22761 Hamburg

Phone numbers:
Human resources department: +49 4307 900 407
Marketing department: +49 4307 900 402

E-Mail adresses:
contact@assono.de
bewerbung@assono.de