How can I add custom inputs to the attribute inspector?

781
2
09-26-2017 11:00 AM
TimDine
Occasional Contributor II

I'm building an Attribute Inspector for an application.  The application allows the user to click on a feature (displayed from a feature layer) and edit the attributes of that feature.  I'd like to add some additional inputs to the Attribute inspector which will not be populated by fields of that feature.  Is there a tidy way to do this using api methods or is it going to be done with lower level dojo and html manipulation?

What I'm imagining is something like this sample Query and edit related records | ArcGIS API for JavaScript 3.21  except that I'd prefer not to build the whole content.  I'd like the content to be built from the layerInfo like this example Using the attribute inspector | ArcGIS API for JavaScript 3.21  and then modify it.  

If I have to build the additional controls up from dojo objects that's ok.  Ultimately what I'm attempting is to click a feature, show it's fields, get data from another feature, show some of it's fields and allow them to be edited (ideally with all the validation and domains associated with that field) while it looks like one feature to the user.  For external reasons the attributes can't be on the same feature class / table and there is no relationship class between the two feature layers.

Thanks

0 Kudos
2 Replies
TimDine
Occasional Contributor II

What I've done so far is to create an attribute inspector, let it display the attributes of the first feature.  Next I have used dojo to manipulate the attribute inspector dom adding in more controls containing the data I would like to display.

My next challenge is I'd like to find the code that creates the various dijits for the field controls to save myself a few lines of code creating domain drop downs keeping it nice and tidy.  Any suggestions on samples that use those?

I may also flip my logic.  I may use the attribute inspector to display the related records so that it handles all of the domain logic and then use my code to add the parent attributes to the attribute inspector since they're going to be read only anyway.  I'll keep the graphic for the location on the screen to position the infowindow.

danweiss
New Contributor II

Hi Tim - Sorry for posting this here, but the forum would not let me message you any other way unless we were "Connected".  I am hoping you can point me in the right direction with regard to a problem.  I found you thanks to an an old post of yours:  

  https://community.esri.com/thread/58899#comment-281790 - "Attempting to export ESRI objects from ArcFM Data"

We also have a desire to script the conversion of ArcFM objects back to ESRI objects when creating a FGDB.

While we can successfully script the creation of FGDB, we always have to manually convert it back to ESRI objects through the ArcFM tools. Any guidance/direction is VERY much appreciated.

Thanks much for your time,
Dan

0 Kudos