Integra for Notes Banner
  QuickReports Integra4Notes Integra Family of Products



Setting up and using custom dialogs

Custom dialogs can be created and selected in the Custom Dialog field found in the Word/Excel tab of the Integra profile.

The following steps must be performed in order to create and use custom dialogs:
  1. Open the Integra database in Domino Designer and add a new subform.
  2. Create the required fields (e.g. Dialog_CompanyName, Dialog_DateFrom and Dialog_DateTo)
  3. Save the subform and name it '_Dialog_any name'' (e.g. _Dialog_TSStatement)
  4. Open the Integra database in the Notes client
  5. Run the Integra maintenance process from the Actions Menu - Administration\Integra Maintenance (you require the [Admin] user role to be able to run this process) so that the list of available custom dialogs are refreshed.
  6. Edit the Integra profile which is going to make use of this custom dialog, go to the Word/Excel tab and select the dialog in the Custom Dialog field.
  7. Place the code below into the Advanced Script Callback tab of the Integra profile and amend it as required.
  8. Save and close the Integra profile
Const CB_INITIALISE = 3
Const CB_ACTIONONLY = 16
Const CB_BFOREXPORT = 10
Const CB_INVALID = 12
Const CB_CATEGORY = 13
Const CB_TOTAL = 14
Const CB_CONFLICT = 15
Const CB_BFORREADNOTES = 6
Const CB_BFORWRITECOM = 1
Const CB_AFTERWRITECOM = 9
Const CB_BFORCOMACTION = 5
Const CB_BFORNOTESACTION = 2
Const CB_TERMINATE = 4

dim dtfrom  As String
dim dtto       As String
dim dtjob     As String

select case stats.cbstatus
case CB_INITIALISE

   dim doc    As NotesDocument

' Get a handle to the user's profile which contains the fields
' found in the custom dialog
set doc = GetUserProfile()

Redim stats.uservar(2)

' Read values entered in the dialog box
 stats.uservar(0) = Trim(doc.Dialog_CompanyName(0))
 stats.uservar(1) = doc.Dialog_DateFrom(0)
 stats.uservar(2) = doc.Dialog_DateTo(0)

' Exit if the company  name is found to be blank
if Trim(doc.Dialog_CompanyName(0)) = "" then
     export.continue = false
end if

case CB_ACTIONONLY
case CB_BFOREXPORT
case CB_INVALID
case CB_CATEGORY
case CB_TOTAL
case CB_CONFLICT
case CB_BFORREADNOTES
' Here, the documents are filtered according to the
' values entered in the custom dialog


' Read the job date from document being processed
dtjob  = Format(stats.expdoc.DateJob(0),"yyyymmdd")

' Read 'from' and 'to' dates from stats.uservar
dtfrom = Format(stats.uservar(1),"yyyymmdd")
dtto   = Format(stats.uservar(2),"yyyymmdd")

' Check whether doc matches criteria entered in the custom dialog
If Not Trim(Ucase(stats.expdoc.CompanyName(0))) = Ucase(stats.uservar(0)) Then
export.continue = False
Elseif (dtjob >= dtfrom) And (dtjob <= dtto) Then
' Validation passed
Else
export.continue = False
End If

case CB_BFORWRITECOM
case CB_AFTERWRITECOM
case CB_BFORCOMACTION
case CB_BFORNOTESACTION
   if not stats.savdoc is nothing then
       ' before save as...
   else
       ' before send to
   end if
case CB_TERMINATE
end select

.




FAQ# 0213
Bookmark and Share

 
QUICK LINKS
 
 

 

  © Shireburn Software Ltd. 2008 - 2024