Integra for Notes Banner
  QuickReports Integra4Notes Integra Family of Products

Integra Script Library Documentation


Context:

Class Method (Function)

Library/Class:

StaticVars Class



Function StaticVars.ShowUserDialog() As Integer

StaticVars.ShowUserDialog (dlg_form as string, dlg_title as string)

This method of the stats object allows to call custom dialogs with the least possible parameters to e.g. enable users to enter filter conditions at runtime. The method requires only two parameters: the dialog form or subform and the dialog title. The custom form or subform has to be created in the Integra database. The method calls the DialogBox() function of the Utilities script library, which provides a view more parameters:


    ' Please refer to the Utlities script library documentation for the details re the additional parameters
    ShowUserDialog = Dialogbox(dlg_form,True,True,False,False,False,False,dlg_title,True,False)

The DialogBox function in turn calls the NotesUiWorkspace.DialogBox() method in the context of the user's runtime profile (hidden Notes document), in which any field input is saved.

Note: if you require a user to input additional information at runtime you need to use this method of the stats object.

Sample:
 



  ' For this sample we assume that there is a custom form called "ReportPeriodDialog" created in the Integra database,
' containing two fields named "Date_From" and "Date_To" to enter a date period.

Const CB_INITIALISE = 3
Const CB_BFOREXPORT = 10
Const CB_BFORREADNOTES = 6
Const CB_BFORWRITECOM = 1
Const CB_BFORCOMACTION = 5
Const CB_BFORNOTESACTION = 2
Const CB_TERMINATE = 4

Select Case stats.cbstatus
Case CB_INITIALISE
Case CB_BFOREXPORT
Dim period_from As Variant
Dim period_to As Variant
Dim usrdoc As notesdocument

' Use either the simplified stats.DialogBox() method...

export.continue = stats.ShowUserDialog("ReportPeriodDialog","Report Period Dialog")

' ...or alternatively the more advanced DialogBox() function of the Utilities library.
' You can modify the other parameters to change the behaviour of the dialog box.
' export.continue = Dialogbox("ReportPeriodDialog",True,True,False,False,False,False,"Report Period Dialog",True,False)

If export.continue Then
' The user's input is stored in the user's hidden database profile.
Set usrdoc = GetUserProfile()

' With Integra 4.3 it is recommended to use following code line instead
' Set usrdoc = stats.Utilities.utlGetUserProfile()

period_from = usrdoc.Date_From(0)
period_to = usrdoc.Date_To(0)

stats.FTFilter = | FIELD PostedDate >= | & period_from & | AND FIELD PostedDate <= | & period_to
End If

Case CB_BFORREADNOTES
Case CB_BFORWRITECOM
Case CB_BFORCOMACTION
Case CB_BFORNOTESACTION
Case CB_TERMINATE
End Select
 

 
QUICK LINKS
 
 

 

  © Shireburn Software Ltd. 2008 - 2024