3

I am trying to connect to a Real Estate Transaction Standards (RETS) server to pull listing where Matrix_Unique_Id is in a list of bigint values.

My DMQL query IN-clause looks something like this

(Matrix_Unique_Id=|123456789456,845686745,845156413,8654543354)

However, that is giving me the following error

DMQL: Invalid BigInt criteria for field 'Matrix_Unique_ID'string

If I use the same syntax to search for a string in a list it works fine for example

(Status=|Active,Pending,Expired)

How can I search the listing where Matrix_Unique_Id in a long list of values?

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
Junior
  • 11,602
  • 27
  • 106
  • 212

2 Answers2

2

It turned out to be that IN Syntax works only for string types.

To get the bigint working, I had to do the following nasty syntax

(Matrix_Unique_Id=123456789456)|(Matrix_Unique_Id=845686745)|(Matrix_Unique_Id=845156413)|(Matrix_Unique_Id=8654543354)

The above gave me the intended result. However, since this makes the request URI much lengthier, I had to submit multiple requests to avoid HTTP error code 404 or 414.

Junior
  • 11,602
  • 27
  • 106
  • 212
2

There is difference between DMQL query IN-clause for normal field and lookup field in RETS server.

In your first example you gave the query with pipe symbol "|". But then it will work for lookup values like "Status", "City", "County" etc.

You should try like this for Matrix_Unique_Id(normal field),

(Matrix_Unique_Id=123456789456,845686745,845156413,8654543354)

The answer you have written also correct, but then its lengthy and useful only for multiple fields in query.

Note: There is no difference for either bigint or string while querying.

V-T
  • 756
  • 2
  • 9
  • 22