Select to view content in your preferred language

attributeInspector in sidebar

2391
3
Jump to solution
10-16-2015 02:01 PM
TracySchloss
Honored Contributor

I've looked at the Editor widget, but it ties me to adding features by map click and places the attributes in the info tag.  I want the point to originate with a geocoded address and attributes in the sidebar. I found an older example that has the attribute editing positioned there, but without any graphic editing.  Right now I'm trying to select a point, open the attributeInspector and also let the user drag the point. 

It works to select and drag the point, but it never opens the attributeInspector.  I'm getting an error, which is of no help "unable to complete operation".  It provides a line number in the init.js file.  I hate these kinds of errors, I can never track down where the problem is.

Here's what I have so far:

JS Bin - Collaborative JavaScript Debugging

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Tracy,

  It is a simple as wrong field name.

selectQuery.objectIds = [evt.graphic.attributes.OBJECTID];

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Tracy,

  It is a simple as wrong field name.

selectQuery.objectIds = [evt.graphic.attributes.OBJECTID];

KellyHutchins
Esri Frequent Contributor

Just to add to Robert's answer - if you want to determine in code the object id name you can do something like this:

       var oidField = featureLayer.objectIdField;

        selectQuery.objectIds = [evt.graphic.attributes[oidField]];

TracySchloss
Honored Contributor

That's what I get for not paying enough attention to what I'm copying from another example! 

0 Kudos