Attachment Relate Info Window Widget on editable feature layer?

1024
13
04-12-2011 07:42 AM
WilliamBall1
New Contributor
I have a question about the Attachment Relate Info Window Widget.  I can get the widget to work and show related tables, but the problem is that I would like to use it with a couple of editable layers.  If I list the layer as an operation layer in the config.xml it works when I use the MapServer REST endpoint but not when I use the FeatureServer REST endpoint.  I need the FeatureServer layer in order to edit the layer.  I've also tried listing both, but that doesn't work.  Is it possible to use this widget with an editable feature layer?
Tags (2)
0 Kudos
13 Replies
RobertScheitlin__GISP
MVP Emeritus
William,

   Several of my example configurations are using FeatureServer URLs so I am not sure what issue you are encountering.
0 Kudos
WilliamBall1
New Contributor
Thanks for your reply, Robert!  Here's my code from config.xml (see Manholes at bottom):

<operationallayers>

<layer label="500 Yr Flood" type="feature" visible="false" alpha = ".5"
   url="http://cmsv0263csw-a11/ArcGIS/rest/services/pagosa/Pagosa_non-editable/MapServer/18"/>

<layer label="100 Yr Flood" type="feature" visible="false" alpha = ".5"
   url="http://cmsv0263csw-a11/ArcGIS/rest/services/pagosa/Pagosa_non-editable/MapServer/17"/>

<layer label="Floodway" type="feature" visible="false" alpha = ".5"
   url="http://cmsv0263csw-a11/ArcGIS/rest/services/pagosa/Pagosa_non-editable/MapServer/16"/>

<layer label="Sewer Main Lines" type="feature" visible="true"
  url="http://cmsv0263csw-a11/ArcGIS/rest/services/pagosa/Pagosa_editable/FeatureServer/1"/>

<layer label="Manholes" type="feature" visible="true"
  info="widgets/InfoTemplates/AttRelateInfoWinWidget.swf"
  infoconfig="widgets/InfoTemplates/sewer.xml"
  url="http://cmsv0263csw-a11/ArcGIS/rest/services/pagosa/Pagosa_editable/FeatureServer/0"/>

</operationallayers>

When configured this way, when I click on a manhole, the popup appears and then I click on the datagrid icon and get an empty datagrid, no related table listed.  However when I make this a MapServer layer it works as expected, i.e., the related table is listed in the datagrid.  Also--and this might be the way it's supposed to be--but in the REST services directory I can see the related table when I follow the MapServer link , but not the FeatureServer link.

Bill Ball
Special Projects Manager
Office of Community Services
Fort Lewis College
Durango, CO
0 Kudos
WilliamBall1
New Contributor
When I click on the feature, the pop-up appears as expected with data from the primary feature class, but when I click on the "Related Table" icon the Table window is empty.  When I click "Done" I get this error message:

"Invalid value for parameter 'relationshipId'"

The related table shows up in the rest services directory and I can click on the link for the related table there and see all the fields. 

Any help with this would be greatly appreciated!

Bill Ball
Special Projects Manager
Office of Community Services
Fort Lewis College
Durango, CO
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bill,

   Attach this file please.

widgets/InfoTemplates/sewer.xml
0 Kudos
WilliamBall1
New Contributor
Here's the code (the upload utility would allow xml, so thought this was just as easy as uploading txt):

<?xml version="1.0" ?>
<configuration>
    <fields>mh_id</fields>
    <titlefield>Manholes</titlefield>
<layername>Manholes</layername>
    <links>
     <linkfield icon_or_text_or_img="" icon="" linkalias="" linkprefix="" linksuffix=""></linkfield>
    </links>
    <datefields></datefields> <!-- field in milliseconds -->
    <zoomscale>5000</zoomscale>
</configuration>

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bill,

  Begin by adding :

<fields>mh_id,OBJECTID</fields>

Not really sure why you would only want to show one field in an info popup anyway...
0 Kudos
WilliamBall1
New Contributor
OK, thanks Robert.  I tried adding the objectid and I get the same result with the difference that the objectid now shows up in the info pop-up, as you would expect.  But the table window is still showing no tables and still the "Invalid value for parameter 'relationshipId'" error.

The reason I only have the manhole id in the popup is because that is the only meaningful information in the primary feature class.  All of the meaningful data is in the related table that has multiple entries per manhole based on inverts in and out of the manholes.  If I had created the original dataset I might have structured it differently, but still would need the related table for the inverts. I'm just trying to display the manholes for them in this municipal web app.

-Bill
0 Kudos
WilliamBall1
New Contributor
OK, I finally got this to work.  The problem was with the way I did my relate. 

Thanks for a great widget, Robert!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bill,

   Just for information sake, do you remember what it was that was wrong?
0 Kudos