Merging documents is one of the most important functions in STAC, and the variables are the engine that powers the merge.
There are hundreds of variables available in STAC that list virtually any field stored in the database. There are variable that prints events, relationships, charges, sentences, etc, and the variables are organized by the Variable Type which closely correlates with the different areas in STAC.
Since each agency can create it’s codes to track events, relationships, images, etc, it can also create variables to print the data stored in these areas. For example, if a user creates a new Relationship code to track a new party related to a case, they can also create variables to output data about this relationship.
As we mentioned before, except for some motions and a few other documents that require attorneys to type specific facts about a case, every document should be 100% ready. After the merge the users should not have to make a single correction. Any document that requires updating after every merge is a strong indication of bad data quality or the use of an incorrect variable.
There is one type of variable that displays a field where the user merging the document can type a text that will be merged into the document. This variable should be rarely used! There are situations where data is needed in a document that may not be stored in the database, and that is the reason this variable was created. However, this variable should not be used in place of collecting the data in the case and merging it.
The first five fields in the Variable Add/Edit screen are the most important. The variable should clearly reflect the output of the variable. Once a variable is created it should never be renamed after it’s added to a document template because renaming a variable will break any document that uses that variable. Users can change the properties of a variable without breaking the document, but renaming a variable will result in documents not merging properly. The Variable Type and Variable Column fields are where users can define what the variable does. The fourth and fifth fields are where users define the codes that this variable will be looking for. For example, to print the date of the next hearing, users would choose Next Event for the type, Date for the column, and Hearing for the code.
| Variable Type | Description | ||
|---|---|---|---|
| INCIDENT | Fields related to a case. In addition to the case number, county, and other fields, this category includes fields that list the SA or PD name, clerk name, etc. |
Incident variables return fields from the incident table, like Case number, Clerk number, County, Case Type, and Trial Location, etc. Additionally, this variable returns values associated with the fields associated with the case, like the address for each location, name of the Elected Official, and others
| Variable Column | value or where it can be set |
|---|---|
| ADDRESS | Office address set in the location code table |
| CASE_NUMERIC_PORTION | Numeric portion of a case without leading zeros |
| CASE_SUB_TYPE | |
| CASE_TYPE | |
| CASE_YEAR | |
| CIRCUIT OR COUNTY | Circuit or County based on the court type code table |
| CITY | Office city set in the location code table |
| CLERK | |
| CLERK_NUMERIC_PORTION | Numeric portion of Clerk# without leading zeros |
| CLERK_TYPE | |
| CLERK_YEAR | |
| COMMENT | |
| COUNTY | |
| COUNTY CHIEF ASSISTANT | This value is set in the county code table |
| COUNTY CIRCUIT NAME | This value is set in the county code table |
| COUNTY CIRCUIT NUMBER | This value is set in the county code table |
| COUNTY CLERK | This value is set in the county code table |
| COUNTY NAME 1 | This value is set in the county code table |
| COUNTY NAME 2 | This value is set in the county code table |
| COUNTY PUBLIC DEFENDER | This value is set in the county code table |
| COUNTY SHERIFF | This value is set in the county code table |
| COUNTY STATE ATTORNEY | This value is set in the county code table |
| COUNTY STATE ATTORNEY BADGE | This value is set in the county code table |
| COURT_TYPE | |
| CRIME_LAB | |
| CRIMINAL, TRAFFIC, JUVENILE | |
| DEFENDANT_LETTER | |
| DEPARTMENT | |
| DEPARTMENT_PHONE | This value is set in the department code table |
| DIVISION PARALEGAL | This value is set in the department division detail table |
| DIVISION PHONE | This value is set in the department division detail table |
| DIVISION SECRETARY | This value is set in the department division detail table |
| DIVISION SUPERVISOR | This value is set in the department division detail table |
| EFILE_UCN | |
| FILING_NO | |
| GUIDELINE_DEPARTURE | |
| INCIDENT_ID | |
| INCIDENT_NO | |
| INCIDENT_NO_PRINTABLE | Case# formatted with dashes if used in the mask |
| INCIDENT_TYPE | |
| LOCATION | |
| MAIL_ADDRESS | Office mailing address set in the location code table |
| MAIL_CITY | Office mailing city set in the location code table |
| MAIL_STATE | Office mailing state set in the location code table |
| MAIL_ZIP | Office mailing zip set in the location code table |
| MED_EXAMINER | |
| NEW CLERK NUMBER | |
| PHONE_1 | This value is set in the county location table |
| PHONE_2 | This value is set in the county location table |
| PHONE_3 | This value is set in the county location table |
| PHONE_4 | This value is set in the county location table |
| PHONE_COMMENT_1 | This value is set in the county location table |
| PHONE_COMMENT_2 | This value is set in the county location table |
| PHONE_COMMENT_3 | This value is set in the county location table |
| PHONE_COMMENT_4 | This value is set in the county location table |
| SENTENCE_GUIDELINE | |
| SENTENCE_GUIDELINE_RANGE | |
| SENTENCE_POINTS | |
| SPECIAL_CODE_1 | |
| SPECIAL_CODE_2 | |
| SPECIAL_CODE_3 | |
| STANDARD CLERK | |
| STATE | Office State set in the location code table |
| TRIAL LOCATION | |
| VIOLENT_CRIME | |
| ZIP | Office ZIP code set in the location code table |
Relationship variables are to be used with relationships that are unique in a case, like the judge, the prosecutor, the defense attorney, the defendant, etc. It will return only a single record regardless of how many relationships of that type there are in a single case. One of the most common mistakes is to use this type of variable to print victims. Since many cases have no victim or one victim, the variable works most of the time, but in cases with multiple victims, this variable will only print the first victim, and the document will be incorrect because of the missing victims. This variable type returns individual fields from the directory, address, and relationship tables, in addition to special fields where data is preformatted, like the name or address of a person
Relationship Document variables work exclusively with Relationship Documents. These variables do not require any additional settings because the document tells the variable which relationship should be printed. An easy way to understand this variable is to think of subpoenas. Subpoenas are generated for multiple relationships in a case and the selection of the person or entity being subpoenaed is made by the document. Relationships Document variables return the data about the individual or entity the document is processing.
| Type | Description |
|---|---|
| RELATIONSHIP | Relationship in a case. This variable should be used exclusively for relationships that are unique to a case like a defendant, judge, or current attorney. |
| RELATIONSHIP DOCUMENT | This variable only works on Relationship Documents and list fields for the relationships selected during the merge process. For example, when merging subpoenas for multiple witnesses, this category of variables prints the data related to each selected relationship |
| RELATIONSHIP DOCUMENT EVENT | Lists of events data related to the directory selected on a Relationship type document. Allows printing events related to a selected relationship |
| RELATIONSHIP DOCUMENT EVENT LIST | Lists of events data related to the directory selected on a Relationship type document. Allows printing events related to a selected relationship. Prints list of events |
| RELATIONSHIP LIST | List of relationships on case |
| RELATIONSHIP SELECTED | List of relationships on case |
| CASE RELATIONSHIP LIST | Lists relationships in consolidated cases. |
| CASE RELATIONSHIP SELECTED | Lists relationships in consolidated cases. |
There are two basic types of event variables: Variables that print a single event and variables that print a list of events.
All Events can be FIRST, LAST, NEXT, AND PREVIOUS types print a single event. They return records based on the event date.
EVENT LIST and EVENT SELECT returns a list of events. The LIST automatically merges all matching records and the SELECTED displays a selection list on the screen
These variables can be defined using a combination of event type and/or event subtypes. The list and selected variables allow multiple events to be defined for the same list. The other variables allow one single event type and/or event subtype
| Type | Description |
|---|---|
| EVENT LIST | List of events on a case |
| EVENT LIST FUTURE | List of events on a case with a future date |
| EVENT LIST PAST | List of events on a case with a date in the past |
| EVENT SELECT | List of events on a case. The application displays a screen to allow users selecting the events that will be merged |
| EVENT SELECT FUTURE | List of future events on a case. The application displays a screen to allow users selecting the events that will be merged |
| EVENT SELECT PAST | List of past events on a case. The application displays a screen to allow users selecting the events that will be merged |
| FIRST EVENT | First chronological event of a case regardless if the date is in the past or future |
| LAST EVENT | Last chronological event of a case regardless if the date is in the past or future |
| NEXT EVENT | Next chronological event of a case based on the date and time a document is merged |
| PREVIOUS EVENT | Last chronological event of a case based on the date and time a document is merged |
| Type | Description |
|---|---|
| CHARGE DISPOSED | List of the most recent disposed charges. They can the current set of charges if the case is closed or the charges disposed of in the previous sequence of charges if the case is still open |
| CHARGE FILED | List of the most recent filed charges |
| CHARGE FIRST COUNT | First count of the most recent sequence of charges. This returns only the first count |
| CHARGE LIST | List of the most recent sequence of charges. This is the most commonly used type |
| CHARGE MERGE | Variable used to create the Information. Merges the text associated with each statute used on a case. The configurations associated to this process can be located in the Document Options code table |
| CHARGE NOT FILED | List charges in the previous sequence that are not listed in the current sequence |
| CHARGE ORIGINAL | List of the first sequence of charges |
| CHARGE SENTENCE | Charges that are related to a sentence |
| PRIMARY CHARGE LIST | First sequence of charges on a case |
| Type | Description |
|---|---|
| SENTENCE | Lists sentence record on a case |
| Type | Description |
|---|---|
| Basic fields for an email. I.E. recipient, office name, Email comment | |
| EMAIL ASSIGNMENT | Email field related to an assignment. Used during the approval process |
| EMAIL DOCUMENT | Email field related to a Document. Used when emailing documents during the merge process |
| EMAIL EVENT | Email fields used on emails created upon adding an email |
| EMAIL IMAGE | Email fields for email created from the Image tab |
| EMAIL INVESTIGATION EVENT | Email fields for email created from the Investigation tab |
| EMAIL NOTE | Email fields for email created from the Notes tab |
| EMAIL REQUEST | Email fields used for the request module as requests are created and approved |
| EMAIL SUBPOENA | Emails fields related to subpoenas. Used during the merge |
Email variables return fields from the specific module they are referencing, like the Email Image Variable Type will give the users fields based on the Image tab. The fields include the code, comment, date, document, filename, image ID, etc.
Below, we can see the variable column options for the Variable Type Email Image.
| Variable Column | Value Description |
|---|---|
| Code | The CODE section plays a crucial role in identifying and categorizing records. It consists of two key components: Code Type: Denotes the primary code used for record identification, such as Event Type, Relationship, Diversion, etc. Code Sub Type: Specifies the secondary subcode for further record identification. For example, when dealing with specific hearing types, the Code Sub Type might include hearing subtypes. TIP: Not all variables require both Code Type and Code Sub Type |
| Comment | This pertains to the comment entered in the relevant comment field. It provides additional context or details regarding a specific record |
| Date | Refers to the image date |
| Document | This section involves extracting information from the image subtype configuration table, specifically from sources like exchanges and the CIP Portal. To determine the image type and sub type, use the corresponding code and code sub type presented below the Variable Column |
| Image ID | The unique identification number assigned to an image when it is entered into the Image tab |
| Related Name | Indicates the name associated with the image. In the Image tab, when adding or editing an image, the Name field can be activated to select a person from the case or directory linked to the image |
| Sub Type | Indicates the image subtype selected during the processing of the image |
| Type | Indicates the image type selected during the categorization process |

| Type | Description |
|---|---|
| DIVERSION | List of diversions on a case |
| DIVERSION PAYMENT | List of payments for a diversion on a case |
| Type | Description |
|---|---|
| COST | List costs associated with a case |
| COST PER CASE SELECTED | List costs associated with a case, but allow users to select records during the merge |
| Type | Description |
|---|---|
| NOTE | List of notes on a case |
| Type | Description |
|---|---|
| SUBPOENA SELECT FUTURE | List subpoena fields for subpoenas that are scheduled for a future date |
| Type | Description |
|---|---|
| CODE SELECT | Discovery |
| Type | Description |
|---|---|
| CASE VARIABLE | Input box that allows users to type data during merge |
| INPUT VARIABLE | Input box that allows users to type data during merge |
| Type | Description |
|---|---|
| SPECIAL |
| Variable Column | value or where it can be set |
|---|---|
| AGENCY REPORT NO WITHOUT PAGE | Removes portions of the agency report number |
| ALIAS REAL NAME | For AKA records, this list the name defined as the real name of that person |
| BOOKING LIST | A list of booking number |
| CASE DEFENDANT | Lists all co-defendants on consolidated cases |
| CASE DEFENDANT DEMOGRAPHICS | Lists all co-defendants name and demographic information on consolidated cases |
| CASE DEFENDANT NAME | Lists all co-defendants on consolidated cases |
| CASE DEFENDANT, ALIASES AND DEMOGRAPHICS | Lists all co-defendants and their aliases on consolidated cases |
| CASE DEFENDANT, ALIASES, JACKET AND DEMOGRAPHICS | Lists all co-defendants, aliases, their JACKET No, and demographics on consolidated cases |
| CASES BY DEFENDANT | List of other cases for a defendant |
| CHARGE TITLE | Charge title for consolidated charges |
| CHARGE TITLE, BOND | Charge title and bond amount for consolidated charges |
| CHARGE TITLE, SAGES | Charge title and SAGES for consolidated charges |
| CONSOLIDATE CASE NUMBERS | List of consolidated cases |
| CONSOLIDATE CLERK LIST | List of the clerk number for consolidated cases |
| CONSOLIDATE FDLE, STATUTE NO, DEGREE | List of charges in a consolidated case |
| COUNT, CHARGE, DISPO ACTION, REASON, SENT, S COND | Lists the county number, charge description, disposition action, reason, sentence, and sentence special conditions |
| DEF LIST OPEN CONSOLIDATED CASES | List of open consolidated cases for a defendant |
| DEFENDANT AGE | The age of the defendant |
| DEFENDANT AND ALIASES | Defendant name and aliases |
| DEFENDANT AND ALIASES NAME, ID | List of consolidated cases with their directory id |
| DEFENDANT DEMOGRAPHICS | Name and demographics of defendants on consolidated cases |
| DEFENDANT DEMOGRAPHICS, NAME, RACE, AND DOB | Name and demographics of defendants on consolidated cases |
| DEFENDANT, ALIASES AND DEMOGRAPHICS | Name, Aliases, and demographics of defendants on consolidated cases |
| DOCUMENT SEQUENTIAL NUMBER | This variable lists a unique id for each document, allowing it to be used as a receipt number or a unique identifier for the document. To enable this feature go to the Document Options code table and add the Event that will be added to the Event tab with the sequential number/ID, once a case is merged using this variable |
| EVENT DATE FOR CONSOLIDATED CASES | Date when a case was consolidated |
| GUARDIAN NAME | |
| MONTH, YEAR | Current Month and Year. This variable can be used in places like the certificate of service |
| OFFENSE DATE | |
| OPEN CASES BY DEFENDANT | List of Open Cases for the defendant |
| RELATED CASE | List of cases Related to the current case. This can be set in the Case Tab |
| RELATED TO CASE | List of cases Related to the current case. This can be set in the Case Tab |
| SA04 CHARGE LIST | |
| SA10 CASE NO | |
| SPECIAL PROS DEPARTMENT PHONE | |
| TODAY | Current date and time |
| USER | Current user login |
| USER EMAIL | Current user email address |
| USER NAME (FML) | Current user name |
| USER PHONE NUMBER | Current user phone number |
| USER SIGNATURE | Current user signature |
| WRITE YOUR OWN | Read more about WYO below |
Another great advantage of this variable is that it allows variables to be created or modified without having to wait for a new release to be published since these variables don’t have to rely on modifications in the applications
Two arguments can be used in this variable.
| Argument | Description |
|---|---|
| :incidentid | this variable is how the application passes the id of the case being merged. This argument works on any type of document |
| :directoryid | The directory id is only available for documents of type Relationship. This is how the system passes the directory_id of the person selected. If a WYO variable is written using this argument and used on a Case Document, it will most likely return no results |
Write Your Own (WYO) variables can return one or multiple records. When the variable returns multiple records, be sure to set the appropriate List Connector to merge the users results as a list or as a paragraph. This variable returns only one column, so the select statement has to concatenate the result in a single column. Users should take advantage of the functions published by CIP to allow converting and format dates, time, money, and integer fields to a string so they can be concatenated. Additionally, the default behavior in SQL is to transform the whole string into a NULL value when any of the fields being concatenated is NULL, so remember to use the ISNULL function.