JSON Create Lists Query Syntax
The JSON syntax in the reference tables below is used in Create Lists when creating a JSON query. See the creating a JSON query for information on using JavaScript Object Notation (JSON) in Create Lists, the JSON query structure, and example JSON queries.
See Creating Lists (Review Files) for more information on creating and working with review files.
Create Lists JSON Syntax for Record Field Discriminators
JSON queries use the following discriminators in the target property to specify the record field or record property to be searched:
record field type | example | JSON discriminator | JSON discriminator property | example JSON query syntax | Notes |
---|---|---|---|---|---|
variable-length field (non-MARC tag) | Bibliographic Author (field group tag "a") | field | tag | "field": {"tag": "a"} | Use the field discriminator with the tag property for non-MARC field tag searches. See Field Groups for more information about Innovative field group tags. |
variable-length field (MARC field tag) | Bibliographic MARC 245 ("245 4|abch") | field |
marcTag optional properties: ind1, ind2, subfields |
"field": {"marcTag": "245", "ind1": " ", "ind2": "4", "subfields": "abch"} |
Use the field discriminator with the marcTag operator for MARC-tag searches. Use the ind1/ ind2 and subfields properties only for MARC-tag searches that include a first indicator and a second indicator, and/or searches that include a MARC subfield. You can omit these properties if you are only searching the numeric field tag. Note that if you use either ind1 or ind2 in your query, both of these properties must be in included in the query syntax, or the system will provide whichever is missing and assign it a null ("0") value for the purposes of the search. You can omit both ind properties in your query and use only the subfields property along with the marcTag property. |
fixed-length field | Item Status (ff# 88) | id | none | "id": 88 | The JSON id number is the same as the fixed-length field number. These numbers are three or fewer digits. |
special field (MARC leader and control fields) | Bibliographic MARC 008 'Country' subfield | specialField | none | "specialField": 268 | See the specialField note below for more information on how the system stores MARC leader and control field elements. |
record property | Item Hold Patron | id | none | "id": 8001 | The field id number is four or more digits. |
specialField Note
The specialField number is a number that Sierra uses to identify a MARC leader or control field element (the @ Num). These numbers are documented in the following topics:
Create Lists JSON Syntax for Relational Operators
Create Lists queries include one or more relational operators to specify the search criteria for the records. The table below includes the JSON query syntax for the operators in the "op" property:
Operator |
Operator Name |
JSON op property syntax |
= | Equal to | equals |
!= | Not equal to | not_equal |
> | Greater than | greater_than |
< | Less than | less_than |
>= | Greater than or equal to | greater_than_or_equal |
<= | Less than or equal to | less_than_or_equal |
H | Has | has |
A | All fields don't have | all_fields_not_have |
O | At least one field doesn't have | at_least_one_field_not_have |
W | Between | between |
N | Not within | not_within |
I | In | in |
^ | Starts with | starts_with |
$ | Ends with | ends_with |
E | Exist | exists |
N | Not exist | not_exists |
T | equals today | today |
Y | equals yesterday | yesterday |
V | within last week | last_week |
M | within last month | last_month |
A | is this many days ago | days_ago |
B | is this many weeks ago | weeks_ago |
C | is this many months ago | months_ago |
R | Matches (regular expression) | regex |
Create Lists JSON Syntax for Record-Type Names
The table below includes the JSON query syntax for Innovative record types, as specified in the "type" property of the query target.
Record Type | JSON syntax |
---|---|
Bibliographic | bib |
Order | order |
Item | item |
Volume | volume |
Checkin | holding |
Patron | patron |
Resource | resource |
License | license |
Vendor | vendor |
Contact | contact |
Invoice | invoice |
Authority | authority |
Course | course |
Program | program |
Section | section |