Back to all

OR Condition not working AbEntry Criteria

Greetings Team,

The following read request:

{
"AbEntry": {
"Scope": {
"Fields": {
"Key": {
"Value": 1,
"Id": 1,
"Number": 1
},
"FirstName": 1,
"LastName": 1,
"Phone": 1,
"Email1": 1,
"Address": {
"AddressLine1": 1,
"AddressLine2": 1,
"City": 1,
"StateProvince": 1,
"ZipCode": 1,
"Country": 1,
"Description": 1
}
}
},
"Criteria": {
"SearchQuery": {
"$AND": [
{ "Type": { "$EQ": "Individual" } },
{
"$QR": [
{ "Udf/$TYPEID(57998)": { "$EQ": "7" } },
{ "Udf/$TYPEID(57998)": { "$EQ": "8" } },
{ "Udf/$TYPEID(57998)": { "$EQ": "9" } }
]
}
]
}
}
}
}

Returns the following error:

{
"Code": -1,
"Msg": [
{
"Message": "Query: /AbEntry doesn't support property "$QR" AbEntryObject",
"ErrorCode": 0
}
]
}

Criteria needs to be Type = "Individual" AND (Udf/$TYPEID(57998) value = "7" OR Udf/$TYPEID(57998) = "8" OR Udf/$TYPEID(57998) = "9")

Note: The UDF Type ID for 57998 is the "Rating" UDF. The read request below works:

{
"AbEntry": {
"Scope": {
"Fields": {
"Key": {
"Value": 1,
"Id": 1,
"Number": 1
},
"FirstName": 1,
"LastName": 1,
"Phone": 1,
"Email1": 1,
"Address": {
"AddressLine1": 1,
"AddressLine2": 1,
"City": 1,
"StateProvince": 1,
"ZipCode": 1,
"Country": 1,
"Description": 1
}
}
},
"Criteria": {
"SearchQuery": {
"$AND": [
{ "Type": { "$EQ": "Individual" } },
{ "Udf/$TYPEID(57998)": { "$EQ": "7" } }
]
}
}
}
}

My $OR block is not working? Seems odd. Please advise, thanks, Joe