Ask Your Question

Field length discrepancies

asked 2016-08-17 15:30:52 -0600

The MaximumLength values reported in the metadata for NEREN RETS does not seem to reflect the values actually returned. For instance, in the RE_1 Class the L_Area field has a max length of 5, but returns values far beyond that.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-17 16:03:09 -0600

updated 2016-08-18 14:12:38 -0600

The L_Area field is a field defined as "Small" in the metadata with a lookup attached and the "Value" of the lookup is numeric. The MaximumLength value is set to the maximum number of digits in that value.

From the RETS/1.8 Specification: MaximumLength - The maximum possible character length after all Transport layer encoding. Transport layer encoding includes both HTTP and XML based encoding, but does not include RETS Lookup Value to Lookup Long Value encoding.

Update 8/18/2016 14:00 CST

Here's an example of data being returned with Format=COMPACT:

<rets replycode="0" replytext="SUCCESS" &gt;="" <delimiter="" value="09"/> <columns> L_ListingID L_Area </columns> <data> 100008 5 </data> <data> 100010 23 </data> </rets>

Here's an example of data being returned with Format=COMPACT-DECODED:

<rets replycode="0" replytext="SUCCESS" &gt;="" <delimiter="" value="09"/> <columns> L_ListingID L_Area </columns> <data> 100008 NH-Belknap </data> <data> 100010 NH-Hillsborough </data> </rets>

You can see that L_Area which is the County field is numeric when returned in COMPACT formula and the lookup LongValue when returned in Compact-Decoded.

Here is the metadata for "Area" lookup (abbreviated):

<metadata-lookup_type system="NEREN" resource="Property" lookup="Area" version="16.6.21224" date="2016-06-14T17:44:42.3Z"> <lookuptype> <metadataentryid>0B1A2BC339DBBAF80005</metadataentryid> <longvalue>NH-Belknap</longvalue> <shortvalue>Belknap</shortvalue> <value>5</value> </lookuptype> <lookuptype> <metadataentryid>0B1A2BC339DBBAF80017</metadataentryid> <longvalue>NH-Hillsborough</longvalue> <shortvalue>Hillsborou</shortvalue> <value>23</value> </lookuptype> </metadata-lookup_type>

edit flag offensive delete link more


I'm still confused. The field says it's a lookup, but the actual data for that field when downloaded from RETS in the COMPACT format is not an index that can be used in a lookup. Instead it contains the actual county name. Is this normal? How are we supposed to find the max length for lookup fields?

CBHB gravatar imageCBHB ( 2016-08-18 10:10:45 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-08-17 15:30:52 -0600

Seen: 320 times

Last updated: Aug 18 '16