Quantcast
Viewing all articles
Browse latest Browse all 2097

Edit Widget: Programmatically Select Feature and Populate attributeInspector

Greetings,

I am attempting to implement some simple attribute validation in a customization of the Edit Widget. To do this I have devised a workflow that *should* work but I am running into snags on my last implementation step. I am so close that I can smell it so I don't want to give up yet. Here is what I am up to:

First, I create a mapPoint of the user's click location and save it in memory. When the user closes the editor.attributeInspector, i save the feature's OBJECTID attribute in memory and run a number of validation checks on the feature that they were just inspecting. If the features attributes do not pass the validation check, I perform a selectFeatures method on my featureLayer using the OBJECTID variable that I previously saved. When the selectFeatures onResult AsyncREsponder runs, I popup the editor's attributeinspector but of course it is empty.

How does one populate the editor.attributeInspector with the attributes of a feature that has been selected using featureLayer.selectFeatures?

THanks, Tyler

Viewing all articles
Browse latest Browse all 2097

Trending Articles