Context: |
General |
Library/Class: |
Sample Code |
Present custom dialog to set full text filter condition at runtime As Integer, Read/Write
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
select case stats.cbstatus
case CB_INITIALISE
case CB_ACTIONONLY
case CB_BFOREXPORT
dim period_from as variant
dim period_to as variant
dim usrdoc as notesdocument
' the ReportPeriodDialog form is a custom form in the Integra database containing two fields to enter a date period (Date_From, Date_To)
' to make this code sample work, this form has to be created in the Integra database
if not stats.ShowUserDialog("ReportPeriodDialog","Report Period Dialog") then
else
' the ShowUserDialog method uses the user's hidden database profile to store any fields created with the custom dialog form
set usrdoc = GetUserProfile()
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_INVALID
case CB_CATEGORY
case CB_TOTAL
case CB_CONFLICT
case CB_BFORREADNOTES
case CB_BFORWRITECOM
case CB_AFTERWRITECOM
case CB_BFORCOMACTION
case CB_BFORNOTESACTION
if not stats.savdoc is nothing then
else
end if
case CB_TERMINATE
end select
|