How global is global variables in lotusscript IBM Notes 9

870 Views Asked by At

In Lotusscript' form (IBM Notes 9) I added global variables and it is working as expected when used in click event on buttons in the form.

But when I added a computed-text element, it can't seem to read the global variable of the form. Which means I cannot use these global variables to configure the computed-text's value and Hide-when properties.

This technique is supposed to simulate the ErrorMsg control in xpage, but I can't get this to use the form's global variable,

I'm thinking of adding a global form which will contain global variables much like the sessionScope in xpage instead.

Or is there a better solution?

Here's the form's global declaration:

global declaration

1

There are 1 best solutions below

0
On

Global variables are only accessible within form's LotusScript code.

Computed text fields use formula language and don't have access to LotusScript's global variables.

Use document fields (items) instead. Those can be accessed by LotusScript code and formula code.