Developing Longview JEQuerySpecs
This chapter contains information on these main topics:
- "Creating JEQuerySpec documents"
- "Using JEQuerySpec functions"
- "Using commands and functions that reference JEQuerySpec documents"
- "Sample JEQuerySpec document"
Creating JEQuerySpec documents
A JEQuerySpec document consists of functions and comments. The JEQuerySpec document is used in conjuction with the Application Framework commands GET JEHEADERS and GET JEDETAILS to query specific journal entry headers and details from the data server repository.
Using JEQuerySpec functions
The following table lists the functions that are used in a JEQuerySpec document.
- ApplicationID
- Category
- Calculated
- Created
- CreationPeriod
- Deleted
- Dimension
- ID
- LastModified
- NonShared
- PostPeriod
- Status
- Type
AppliationID
Use this function to retrieve journal entries by Application ID.
The ApplicationID function in a JEQuerySpec document has the following syntax:
where:
- value is the Application ID to specify.
Category
Use this function to retrieve journal entries of a specific category.
The Category function in a JEQuerySpec document has the following syntax:
where:
- EQ indicates exactly “equal to”
- NE indicates “not equal to”
- jeCategory is one of the following:
Value
Description
STANDARD
To query standard journal entries
ELIMINATION
To query elimination journal entries
Calculated
Use this function to retrieve calculated journal entries.
The Calculated function in a JEQuerySpec document has the following syntax:
where:
- status is one of the following:
Value
Description
INCLUDE
To include calculated journal entries.
This is the default if the Calculated function is not specified.
EXCLUDE
To exclude calculated journal entries.
Created
Use this function to retrieve journal entries created on a specific date or range of dates.
The Created function in a JEQuerySpec document has the following syntax:
where:
- startRange is the starting range for the created date in YYYY-MM-DD format.
- endRange is the ending range for the created date in YYYY-MM-DD format.
Note: To specify a specific created date, use the same value for the parameters startRange and endRange.
CreationPeriod
Use this function to retrieve journal entries created between certain periods of time.
The CreationPeriod function in a JEQuerySpec document has the following syntax:
where:
- startSymbol is the starting range for the creation period. It must be the name of a time period symbol.
- endSymbol is the ending range for the creation period. It must be the name of a time period symbol.
Note: To specify a specific creation period, use the same value for the parameters startSymbol and endSymbol.
Deleted
Use this function to retrieve deleted journal entries. This option applies only if your system has been configured to save deleted journal entries.
The Deleted function in a JEQuerySpec document has the following syntax:
where:
- status is one of the following:
Value
Description
INCLUDE
To retrieve all JEs that have been assigned a journal entry ID.
EXCLUDE
To retrieve journal entries that have not been deleted.
This is the default if the Deleted function is not specified.
ONLY
To retrieve only journal entries that have been deleted.
Dimension
Use this function to specify a dimension and a symbol in a JEQuerySpec to retrieve journal entries containing specific symbols from certain dimensions. You can specify more than one symbol for the same dimension.
where:
- DIMENSION is the name of a dimension.
- SymName is the name of a symbol in the dimension
ID
Use this function to retrieve journal entries by journal entry ID or within a range of contiguous IDs.
Syntax
The ID function in a JEQuerySpec document has the following syntax:
where:
- value1 is the lower range limit of journal entry IDs to retrieve.
- value2 is the upper range limit of journal entry IDs to retrieve.
Note: To specify a specific journal entry ID, use the same value for the parameters value1 and value2.
LastModified
Use this function to retrieve journal entries last modified between certain dates.
The LastModified function in a JEQuerySpec document has the following syntax:
where:
- startRange is the starting range for the last modified date in YYYY-MM-DD format.
- endRange is the ending range for the last modified date in YYYY-MM-DD format.
Note: To specify a specific last modified date, use the same value for the parameters startRange and endRange.
NonShared
Use this function to retrieve non-shared journal entries.
The NonShared function in a JEQuerySpec document has the following syntax:
where:
- status is one of the following:
Value
Description
INCLUDE
To include non-shared journal entries.
EXCLUDE
To exclude non-shared journal entries.
This is the default if the NonShared function is not specified.
PostPeriod
Use this function to retrieve journal entries posted between certain periods of time.
The PostPeriod function in a JEQuerySpec document has the following syntax:
where:
- startSymbol is the starting range for the post period. It must be the name of a time period symbol.
- endSymbol is the ending range for the post period. It must be the name of a time period symbol.
Note: To specify a specific post period symbol, use the same value for the parameters startSymbol and endSymbol.
Status
Use this function to retrieve journal entries with a specific status.
The Status function in a JEQuerySpec document has the following syntax:
where:
- EQ indicates exactly “equal to”
- NE indicates “not equal to”
- jeStatus is one of the following:
Value Description NoStatus
To retrieve journal entries with No Status.
Posted
To retrieve journal entries that have been posted.
Validated
To retrieve journal entries that have been validated.
Errors
To retrieve journal entries with errors (i.e.: journal entries that did not validate).
Review
To retrieve journal entries with a status of Review.
Type
Use this function to retrieve journal entries of a specific type.
The Type function in a JEQuerySpec document has the following syntax:
where:
- EQ indicates exactly “equal to”
- NE indicates “not equal to”
- jeType is one of the following:
Value Description CurrentPeriod
To retrieve journal entries that were created as current period JEs.
Restatement
To retrieve all restatement journal entries.
PPA
To retrieve all PPA journal entries.
FuturePeriod
To retrieve all journal entries that were created as future period JEs.
Using commands and functions that reference JEQuerySpec documents
The following Longview Application Framework commands can reference a JEQuerySpec document:
For more information on these and other commands and functions, see Developing Longview Procedures and Developing Longview Models.
Sample JEQuerySpec document
The following example illustrates a JEQuerySpec document named JEQuery.lvqje.
Note: To add a comment to syntax, insert two forward slashes ( // ) at the beginning of the comment.
JEQuerySpec syntax example
// Sample comment
CATEGORY EQ, STANDARD
TYPE EQ, CURRENTPERIOD
ID 1, TO, 8
STATUS EQ, POSTED
CALCULATED INCLUDE
DELETED EXCLUDE
CREATIONPERIOD A1706_YTD, TO, A1706_YTD
POSTPERIOD A1706_YTD, TO, A1706_YTD
APPLICATIONID “TEST”
NONSHARED EXCLUDE
ENTITIES E1000