saratoga crm: custom criteria

Post on 20-Oct-2014

882 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Experience the new Custom Criteria feature of Saratoga Rich Client's Query Tool and Saratoga Thin Client's Reporting function. Users now have the ability to use SQL queries to create more complex search conditions.

TRANSCRIPT

Custom Criteria

Kathy FarrellSenior Technical Support Specialist Saratoga CRM

Agenda

• Meet the Support Team• Custom Criteria• Demo

2

Meet the Support Team

The Face Behind the Voice – San Jose

Praneetha

Sandy

Kathy

Catherine

The Premiers

Heidi & Tess

Anna

Catherine

Bangalore

Harish

ChandraSasi

Custom Criteria

Custom Criteria

• Enable SQL select criteria in queries• Available as of 6.7.8– Implemented in response to customer requests– Available in both Rich Client Query Tool and Thin Client

Reports• Test environment design implementation available

as of 6.7.7.106 (HF3) • Does NOT generate a schema checksum change!

Custom Criteria

• Enabled/Disabled via Avenue.config at the Central Database– Key = EnableCustomCriteria– Value = 1 to enable– Remove or comment out the key to disable

Rich Client Query Tool

New Tab

Thin Client Reports

New Tab

Schema Wizard Options

• Custom Criteria enabled via avenue.config:– 2 new Schema Options – New options use Authorization Codes for access

• If no Authorization codes are defined– Custom Criteria tabs in QT & Rpts not displayed– Access is not granted to any user

Schema Options

UAdmin

• User with Edit privilege

- Required for designing reports that utilize Custom Criteria

- Edit privilege automatically includes Execute

14

UAdmin

• User with Execute privilege only

- Can run existing reports- Ability to see but not edit the Custom Criteria statement- Ability to supply parameters as needed

15

UAdmin

• User with No privileges

- Reports containing Custom Criteria will “auto run”- User will not see the query dialog boxes at all

• User of type Casual Thin Client – Reports included in their Web Group or on their

dashboard will “auto run”– User will not see the query dialog boxes

16

Query Tool Report Setup

• Select the tables and columns for display• Use the Column Options to customize output

display– Headings, Counts/Subcounts, Repeat Duplicates …

Rich Client

Thin Client

Query Tool/Report Setup

• Any criteria entered under Column Options is ignored when Custom Criteria is used

Checked: Custom Criteria usedUnchecked: Column Options criteria used

Custom Criteria

SQL “Where” clause statement goes here

Description of SQL Criteria

Comment section for documentation or user instruction. Not passed to the db.

Parameters for users

Parameters (@NAME, @TYPE) can be set to assist users in defining criteria

Example

• Selects the columns defined in the query and appends the custom criteria as the “Where” clause in the SQL statement

SITE.Name In (Select top 25 A.Name From Site A WHERE A.NAME NOT LIKE '%?%' order by A.Name ASC )

Return 1st 25 Sites alphabetically, ignoring sites that contain ?

Where Clause editor

• When used, SQL statement issued by QT ends with the word “where”– Select NAME as C0, CITY as C1, STATE as C2, CUSTOMER_NO

as C3, ACCT_TYPE as C4, ACCOUNT_ID as C5 from dbo.SITE where

• Adds on the SQL statement entered into the Custom Criteria window:– SITE.Name In (Select top 25 A.Name From Site A WHERE

A.NAME NOT LIKE '%?%' order by A.Name ASC ) • Performs Results Order By based on column sort options

- Order by C0, C1, C2, C3, C4

25

Table/Column Names

• Table and Column names required– Cannot use Schema aliases– Cannot reference Meta or View columns

SQL Syntax …

• Any valid SQL operator can be used – LIKE clause (%jon%)– SUM– MAX

• Operations can be grouped using “And”, “Or” and “()” i.e. parenthesis etc.

• Saratoga does not check for SQL syntax– Cannot use * as wildcard– Errors are returned directly from the database

SQL Syntax

• Can reference database columns that are not part of the query results

Using SQL Subqueries …

• Subquery selects are based on child records: – Join the parent to the child record – Best to use the primary/foreign key fields – Requires use of SQL Table aliasesSITE.ACCOUNT_ID IN (SELECT ACCOUNT_ID FROM ORDERS O WHERE O.ACCOUNT_ID = SITE.ACCOUNT_ID AND O.ORDER_TOT > 10000)

Parameters

Parameters (@NAME, @TYPE) can be set to assist users in defining criteria

Using Parameters

• Enables an Administrator to define custom criteria, yet still allow a User to specify a criteria value

• Parameters – Must start with a @ sign– Must be single words, no spaces, no special characters– Must specify correct data type • Designer must know the datatype of the field used in criteria

Parameters

• Parameters and data types

Thin Client

Rich Client

Display Based on Security

Edit Rights (which includes Execute)

Execute only Rights

Demo

Demo

• Demo of both Rich and Thin Clients- Examples include:

- Top 25- Sites with No Contacts- Sites without Contacts of a certain Title- Sites with a specific Contact & all other Contacts for the Site- Records outside a range (not between)- Summing of child record values

36

QUESTIONS….

top related