FaxMan SDK Version 4.7
Writing Queries with the FaxMan Query Language

In addition to the pre-defined FaxMan logs, it’s possible to query the FaxMan logs for fax jobs that meet your own criteria. You can for instance, query the log for all faxes that were sent in the last two weeks or all those that failed and were sent to a particular fax number. This is accomplished using the LogQuery property in Fax ActiveX control. FaxMan uses a SQL based query language as the basis for its query language and the expression syntax is described in the Log Query Syntax topic.

 

The following fields are found in the Faxes table and can be specified when querying the logs:

 

 

Field Name

Description

Banner

The Fax Banner 

Comments

The Comments

CoverPage

Name of the CoverPage

Duration

String containing the duration of send/receive session

FaxClass

The class of the modem used to send/recv the fax

FaxID

The FaxId of this fax.

FaxRes

The actual resolution the fax was sent in.

fe

The FaxError

FileList

List of fax files associated with this fax delimited with +.

fs

The FaxState

GenCoverPage

The name of the generated coverpage

HangCode

The Class 2/2.0/2.1 Hangup Code, defaults to -1 for Class 1

LocalID

The local fax Station ID

Log

An integer specifying the  log in which the fax resides

PagesSent

The # of pages sent

Port

The port used to send/recv the fax

Priority

The Priority specified when the fax was scheduled.

Queue

The Queue specified when the fax was scheduled

RecipCompany

The Recipient's Company Name

RecipFax

The Recipient's Fax number

RecipName

The Recipients Name

RemoteID

The remote fax Station ID

ReqPort

The Port that was specified when  the fax was scheduled

Retries

The number of times FaxMan tried to send the fax

RetryCount

The Max # of times the fax should be retried

RetryDelay

The interval between retry attempts in seconds

SendDate

The Date/Time the fax was scheduled to be sent in seconds since 1/1/1970

SenderCompany

The Name of the Sender's Company

SenderFax

The Sender's Fax Number

SenderName

The Sender's Name

SenderVoice

The Sender's Voice Number

SendRes

The Resolution requested when the fax was scheduled.

SentDate

The Date/Time the fax was actually sent in seconds since 1/1/1970

Speed

The Transmission Speed of the fax session

Subject

The Subject of the Fax

TotPages

The Total # of pages in the Fax

UserDefined

The UserDefined data associated with this Fax

 

 

To query the logs for all the faxes sent to the user John Doe you would need to specify this query:

 

RecipName = 'John Doe'

 

You can also combine criteria using the and operator, so if you wanted to find only those faxes in the Pending Log that are destined for John Doe you could use this query:

 

RecipName = 'John Doe' and FaxLog = 1

 

To find all those faxes sent since 3/1/1998 you can use this query:

 

SentDate > strftime('%s','1998-03-01')

 

As you can see the Log Query language is quite powerful and allows you to query the logs based on almost criteria you wish. Be sure to check out the Log Query Language Syntax appendix for a complete list of the functions and operators that are available.

 

 


© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.