First time here? Check out the FAQ!
0

Field length discrepancies

  • retag add tags

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.

CBHB's avatar
CBHB
asked 2016-08-17 15:30:52 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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>

bwolven's avatar
bwolven
answered 2016-08-17 16:03:09 -0500, updated 2016-08-18 14:12:38 -0500
edit flag offensive 0 remove flag delete link

Comments

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's avatar CBHB (2016-08-18 10:10:45 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer