Email Queries

An Email Query provides the ability for employees to request a pre-defined query to be run and retuned via email (in an HTML format). The queries defined here can only be requested by active employees (checks their email address).

 

The frequency of processing such queries is defined in the Queue Schedule record (Queue Type = Receive Email) linked to the Email Address defined for Response Email Address Style.

 

Formatting of the Query Results:

The resultant Query when returned as an email is automatically formatted to suit the fields and records returned.

You have the option of inserting either a blank line or horizontal line for header fields by including the following in your SQL statement:

 

Blank Line: To insert a blank line define a field in your SQL as BLANKLINE (i.e. ‘’as BLANKLINE).   This inserts a space between fields. For more than one blank line, append each with a number (i.e. ‘’as BLANKLINE1, ‘‘as BLANKLINE2, etc...)

Horizontal Line: To insert a blank line define a field in your SQL as HORIZONTALLINE (i.e. ‘’as HORIZONTALLINE).   This inserts a horizontal line between fields. For more than one horizontal line, append each with a number (i.e. ‘’as HORIZONTALLINE 1, ‘‘as HORIZONTALLINE 2, etc...)

 

Entry and Display fields

 

Query Name: This is the name the Query is referred to in the Email Subject line.

 

Query Description: This is an internal description of the Query.

 

Email Subject: This is the subject text that will be sent back to the employee (e.g. Assembly Order Detail for [KEYFIELD] - where KEYFIELD is the value passed for the query.

 

Header Title: This will appear as a title for the header fields in the Body of the email sent to the employee.

 

Header Note: These notes, if entered, will be inserted directly under the Header title in the body of the email.

 

System Header SQL: This is the SQL statement provided with the system. This will only be filled in where the Query is a standard, system-supplied one. It cannot be modified, but can be copied and used in the Company header SQL.

 

Company Header SQL: This is where you could enter your own SQL statement to generate the Header fields instead of using the System Header SQL.

 

Lines Title: This appears as a title for the lines fields in the Body of the email.

 

Lines Note: These notes, if entered, will appear directly under the Lines Title in the body of the email.

 

System Lines SQL: This is the system-supplied SQL to generate the lines. It cannot be modified, but can be copied and used in the Company Lines SQL.

 

Company Lines SQL: This is where you could enter your own SQL statement to generate the Lines fields instead of using the System Lines SQL.

 

Footer Note: These notes, if entered, will appear in the footer of the body of the email.

 

Lookup Index: This links a Lookup Index (like what is used in Report & View Conditions) and is for running the Email Query under 'General-Run Email Query'.

 

 

Buttons

 

Close: This will close the screen.  If you have any unsaved data then you will be asked if you wish to save it before the screen is closed.

 

Add: This will send the cursor to a new line for entry of a new record.

 

Save: This will save the current data without exiting the screen

 

Cancel: Any changes made since the screen was opened or the last time the ‘Save’ Button was pressed will be lost.

 

Delete: This will immediately delete the current record from the list.