Integra for Notes Banner
  QuickReports Integra4Notes Integra Family of Products

Integra Script Library Documentation


Context:

General

Library/Class:

Sample Code



Default structure of advanced callback formula explained As Integer, Read/Write

The default advanced callback formula basically provides an @if(...) construct for the different Integra events. The developer can insert custom formula coding beneeth each event condition. The occurance of events depends on various settings of the Integra profile. The following 2 table show the availability and occurance of Integra's runtime events. Please refer to the Developers Manual for more detailed explanations to the events as such. Further down you will find the default code structure with a short explanation as to the use of each event.


Table 1 - Availability & Occurance


Event

Export

Import

Occurance

Effect of setting
export.Continue = False
import.Continue = False

Since Version

CB_INITIALISE

ü

ü

Once

Abort process, jump to CB_TERMINATE event

2.0

CB_ACTIONONLY

ü


Once

Abort process, jump to CB_TERMINATE event

4.2

CB_BFOREXPORT

ü


Once

Abort process, jump to CB_TERMINATE event

3.0

CB_BFORIMPORT


ü

Once

Abort process, jump to CB_TERMINATE event

3.0

CB_INVALID

ü


For every invalid view entry

Skip to next Notes document

4.3

CB_CATEGORY

ü


For every category entry

Skip to next Notes document

4.3

CB_TOTAL

ü


Once, if view shows totals

Skip to next Notes document

4.3

CB_CONFLICT

ü


For every conflict entry

Skip to next Notes document

4.3

CB_BFORREADNOTES

ü


For every document entry

Skip to next Notes document

2.0

CB_BFORREADCOM


ü

For every Excel row or Word document

Skip to next Excel or Text row, or Word document

2.0

CB_BFORWRITECOM

ü


Once for Single Document exports, otherwise
for every Notes document entry.

Note: usefulness of this event is limited when NOT using the Advanced COM export method

Skip to next Notes document

2.0

CB_AFTERWRITECOM

ü


Once for Single Document exports, otherwise
for every Notes document entry.

Note: usefulness of this event is limited when NOT using the Advanced COM export method

Skip to next Notes document. Effect is limited to Notes Action settings for profiles where a Notes Action is executed per exported Notes document.

4.1

CB_BFORWRITENOTES


ü

For every Notes document created during the import

Skip to next Excel or Text row, or Word document

2.0

CB_BFORCOMACTION

ü


Once

Note: usefulness of this event is limited for Word profiles using the Advanced COM export method with the Print option. The event will be called for the last printed Word document only!

Abort process, jump to CB_TERMINATE event

2.0

CB_BFORNOTESACTION

ü


See table 2

Abort process, jump to CB_TERMINATE event

2.0

CB_TERMINATE

ü

ü

Once

No effect

2.0


Table 2 - Occurance of the CB_BFORNOTESACTION event (precedence on order of Setting)

SettingOccurance
Excel ExportOnce
Normal ExportOnce
Single DocumentOnce
Send To, Confirm or MemoOnce
Merge Option = Collect...Once
OtherwiseFor every Notes document entry


' Default advanced formula for export profiles
statlist := "CB_BFORWRITECOM":"CB_BFORNOTESACTION":"CB_INITIALISE":"CB_TERMINATE":"CB_BFORCOMACTION":"CB_BFORREADNOTES":"CB_NONE":"CB_NONE":"CB_AFTERWRITECOM":"CB_BFOREXPORT":"CB_NONE":"CB_INVALID":"CB_CATEGORY":"CB_TOTAL":"CB_CONFLICT":"CB_ACTIONONLY";
envstat:= @texttonumber(@environment("FormulaCbStatus"));
status:= @subset(@subset(statlist;envstat);-1);


@if(

    status="CB_INITIALISE";
      "";
    status="CB_ACTIONONLY";
      "";
    status="CB_BFOREXPORT";
      "";
    status="CB_INVALID";
      "";
    status="CB_CATEGORY";
      "";
    status="CB_TOTAL";
      "";
    status="CB_CONFLICT";
      "";
    status="CB_BFORREADNOTES";
      "";
    status="CB_BFORWRITECOM";
      "";
    status="CB_AFTERWRITECOM";
      "";
    status="CB_BFORCOMACTION";
      "";
    status="CB_BFORNOTESACTION";
      "";
    status="CB_TERMINATE";
      "";
    ""
)


' Default advanced formula for import profiles
statlist := "CB_NONE":"CB_BFORWRITENOTES":"CB_INITIALISE":
"CB_TERMINATE":"CB_NONE":"CB_NONE":
"CB_BFORREADCOM":"CB_NONE":"CB_NONE":
"CB_NONE":"CB_BFORIMPORT";
envstat := @texttonumber(@environment("FormulaCbStatus"));
status := @subset(@subset(statlist;envstat);-1);

@if(
    status="CB_INITIALISE";
      "";
    status="CB_BFORIMPORT";
      "";
    status="CB_BFORREADCOM";
      "";
    status="CB_BFORWRITENOTES";
      "";
    status="CB_TERMINATE";
      "";
    ""
)


Custom code is to be inserted instead of the two double quotes below each status="event-name" formula condition. If more than one formula function or statement is required one needs to use the @Do(...); function.


Note:
    • @Command() functions are generally not allowed in the context of advanced formula. The same applies for a very few @Functions(). Please refer to the Lotus Notes documentation to learn more about those functions that cannot be executed using the Lotus Script Evaluate() function.
    • In earlier versions of Integra for Notes the event CB_BFORWRITENOTES was called CB_BFORNOTESACTION. However, the value of the constant is the same and therefore both event names (constants) can be used.
    • Integra is executing advanced formulae before it executes advanced script.
    • See also the notes to Advanced error handler script explained
 
QUICK LINKS
 
 

 

  © Shireburn Software Ltd. 2008 - 2024