Select to view content in your preferred language

Related records does not function in Enhanced Search Widget version 3.1.12

838
6
03-19-2013 10:03 AM
ThomasColson
MVP Alum
I have a feature Layer: RoadCenterline_Ground_and_Above_1K (ID: 10) and a related table Layer: Route_ID (ID: 148). Within a file geodabase a1:1  relationship exists between the two using the ROUTE_IDENT field, and inspecting the relationship works flawlessly in ArcMap. Standing up
  <url>http://grsmgis.nps.gov/arcgis/rest/services/Base/Base/MapServer/10</url>
using a Flex Viewer also works fine. As soon as I add
   <relates>
    <relate id="148" label="Route_ID" enableexport="true" enableprintgrid="true"
     icon="assets/images/i_flag.png" printtitle="Routes">
     <fields all="false">
      <field name="ROUTE_IDENT" />
      <field name="RTE_NAME" />
     </fields>
    </relate>
   </relates>

the search results indicate related records but the related record datagrid does not populate, nor does clicking on the related record icon return anything. Yes, I  have confirmed that there is indeed a related record for each feature. This is on Arc GIS Server 10.1, SP1, Flex 3.1.
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Tom,

   I am very skeptical that your relate id is 148.... 148 looks like the ID of the related layer but not the relate ID unless you have 148 relates in your system.

Here is the relates section from the Rest Service directory of my road centerlines layer that has multiple relates on it.

Relationships:

  • calhoun.COUNTY.A_Bridge (0) -- Related To: ABIMS Bridges (0)

  • calhoun.COUNTY.ADT (1) -- Related To: Average Daily Traffic (1)

  • calhoun.COUNTY.Rail_Cross (2) -- Related To: Railroad Crossings (2)

  • calhoun.COUNTY.Signs (3) -- Related To: Road Signs (3)

  • calhoun.COUNTY.Guardrail (4) -- Related To: Guardrails (4)

The relate id for signs would be 3.
0 Kudos
ThomasColson
MVP Alum

[/HR]Here's a copy 'n paste from my rest directory:


Relationships:

  • Route_ID (0) -- Related To: Route_ID (148)

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tom,

   So the relate id is 0 and not 148.

   <relates>
    <relate id="0" label="Route_ID" enableexport="true" enableprintgrid="true"
     icon="assets/images/i_flag.png" printtitle="Routes">
     <fields all="false">
      <field name="ROUTE_IDENT" />
      <field name="RTE_NAME" />
     </fields>
    </relate>
   </relates>
0 Kudos
ThomasColson
MVP Alum
Thanks Robert! Tried that, set it to 0, same result, change relationship cardinality to 1:N, republished everything, same result....
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tom,

   Can you post your XML for the whole layer not just the relate?
0 Kudos
RhettZufelt
MVP Notable Contributor
Robert,

I noticed that his entire xml is in the zip file he attached (still has id="148").

R_
0 Kudos