Custom Views Enhancement

NB This applies to versions 2024.10.7.440 onwards

Usage

To use the parameterised custom views create a custom view following normal procedure, but utilise any of the parameters from the table below.

When a user chooses a custom view from the Lead or Contract browser AdminBase analyses the SQL of the custom view and matches the parameter names to the ones below. If any of these parameters are used it shows the relevant dialog and populates the parameters with the value chosen.

NB. Date parameters must be used in conjunction. i.e. If you use a LDateFrom parameter you must also use a LDateTo parameter.

Example

The below Contract view shows contracts where the InstallationManager is the current user and where the date fitted is in a range selected by the user upon view selection.

Make sure to use Lead parameters with Lead view and Contract parameters with Contract views. i.e. LDateFrom & LDateTo vs CDateFrom & CDateTo

SELECT distinct C1.ContractNo, C1.Name AS CustName, C1.SoldBy, C1.SiteAddress, C1.OfficeRef, C1.DateFitted, C1.Address, C1.DisplayRef, C1.FittingPostcode, C1.CustNo, C1.ProjectNo, C1.ContractDate, C1.TelephoneNumbers, C1.LeadSource, C1.SalesArea, C1.ContractCancelled, C1.DateCancelled, C1.InstallationManager, C1.PaymentMethod, C1.OfficeRef2, C1.ContBal, C1.ContNet, C1.ContGross
FROM
CCR C1
WHERE C1.InstallationManager = :currentuser and C1.DateFitted between :CDateFrom and :CDateTo

Parameters

Parameter Name

LDateFrom & LDateTo

Displays a dialog asking for a date range using week settings for Leads in AdminBase

CDateFrom & CDateTo

Displays a dialog asking for a date range using week settings for Contracts in AdminBase

SelectedDate

Displays a dialog asking for a single date

Salesperson

Displays a dialog allowing choice of a salesperson

InstallManager, Surveyor, Fitter

Displays a dialog allowing choice of an Installation Manager, Surveyor or Fitter

SalesArea

Displays a dialog allowing choice of a Sales Area/Branch

LastWeekFrom & LastWeekTo

AdminBase automatically supplies these values to the custom view query

LastMonthFrom & LastMonthTo

AdminBase automatically supplies these values to the custom view query

ThisWeekFrom & ThisWeekTo

AdminBase automatically supplies these values to the custom view query

ThisMonthFrom & ThisMonthTo

AdminBase automatically supplies these values to the custom view query

NextWeekFrom & NextWeekTo

AdminBase automatically supplies these values to the custom view query

NextMonthFrom & NextMonthTo

AdminBase automatically supplies these values to the custom view query

CurrentUser

AdminBase automatically supplies these values to the custom view query

ContractType

Displays a dialog allowing choice of a Contract Type

RemedialType

Displays a dialog allowing choice of a Service Call / Remedial Type

QuoteType

Displays a dialog allowing choice of a quote type

SelectedText

Displays a dialog allowing text to be used in the query

ReportingGroup

Displays a dialog allowing choice of a reporting group

EventCategory

Displays a dialog allowing choice of a contract appointment type

NB This applies to versions 2024.10.7.440 onwards